git ssb

30+

cel / git-ssb-web



Commit 0c847c3c4d0f54a49a7e8b057c37a69857ceb88c

Merge branch 'master' of ssb://%q5d5Du+9WkaSdjc8aJPZm+jMrqgo0tmfR+RcX5ZZ6H4=.sha256 into more_index_hyperscript

mix irving committed on 11/10/2016, 9:57:37 AM
Parent: 14c6604e9dbde43363ceabea4f528ced348c5652
Parent: 8da0b6c786cd7465b74bf18c25423cc4722a1397

Files changed

README.mdchanged
index.jschanged
lib/repos/index.jschanged
lib/repos/pulls.jschanged
package.jsonchanged
README.mdView
@@ -5,8 +5,9 @@
55 Public installations:
66
77 - https://gitmx.com/
88 - https://git-ssb.celehner.com/
9 +- http://git.mixmix.io/
910
1011 ## Install
1112 ```
1213 npm install -g git-ssb-web
index.jsView
@@ -790,13 +790,12 @@
790790
791791 var search = new RegExp(q, 'i')
792792 return this.serveTemplate(req, req._t('Search') + ' · ' + q, 200)(
793793 this.renderFeed(req, null, function (opts) {
794- opts.type == 'about'
795794 return function (read) {
796795 return pull(
797796 many([
798- self.getRepoNames(opts),
797 + self.getMsgs('about', opts),
799798 read
800799 ]),
801800 pull.filter(function (msg) {
802801 var c = msg.value.content
@@ -811,21 +810,15 @@
811810 })
812811 )
813812 }
814813
815-G.getRepoNames = function (opts) {
816- return pull(
817- this.ssb.messagesByType({
818- type: 'about',
819- reverse: opts.reverse,
820- lt: opts.lt,
821- gt: opts.gt,
822- }),
823- pull.filter(function (msg) {
824- return '%' == String(msg.value.content.about)[0]
825- && msg.value.content.name
826- })
827- )
814 +G.getMsgs = function (type, opts) {
815 + return this.ssb.messagesByType({
816 + type: type,
817 + reverse: opts.reverse,
818 + lt: opts.lt,
819 + gt: opts.gt,
820 + })
828821 }
829822
830823 G.serveBlobNotFound = function (req, repoId, err) {
831824 return this.serveTemplate(req, req._t('error.BlobNotFound'), 404)(pull.once(
lib/repos/index.jsView
@@ -252,9 +252,9 @@
252252 })
253253 })
254254 }
255255
256-R.serveEmptyRepo = function (req, repo) {
256 +R.renderEmptyRepo = function (req, repo) {
257257 if (repo.feed != this.web.myId)
258258 return this.renderRepoPage(req, repo, 'code', null, null,
259259 h('section', [
260260 h('h3', req._t('EmptyRepo'))
@@ -302,9 +302,9 @@
302302 ]),
303303 rev ? cat([
304304 h('section', {class: 'files'}, renderRepoTree(req, repo, rev, path)),
305305 this.renderRepoReadme(req, repo, rev, path)
306- ]) : this.serveEmptyRepo(req, repo)
306 + ]) : this.renderEmptyRepo(req, repo)
307307 ]))
308308 }
309309
310310 /* Repo activity */
lib/repos/pulls.jsView
@@ -176,28 +176,25 @@
176176 return self.repo.issues.renderIssueActivityMsg(req, repo, pr,
177177 req._t('pull request'), postId, item)
178178 })
179179 ),
180- !self.web.isPublic && pr.open && pull.once(
181- '<section class="merge-instructions">' +
182- '<input type="checkbox" class="toggle" id="merge-instructions"/>' +
183- '<h4><label for="merge-instructions" class="toggle-link"><a>' +
184- req._t('mergeInstructions.MergeViaCmdLine') +
185- '</a></label></h4>' +
186- '<div class="contents">' +
187- '<p>' + req._t('mergeInstructions.CheckOut') + '</p>' +
188- '<pre>' +
189- 'git fetch ssb://' + u.escape(pr.headRepo) + ' ' +
190- u.escape(pr.headBranch) + '\n' +
191- 'git checkout -b ' + u.escape(pr.headBranch) + ' FETCH_HEAD' +
192- '</pre>' +
193- '<p>' + req._t('mergeInstructions.MergeAndPush') + '</p>' +
194- '<pre>' +
195- 'git checkout ' + u.escape(pr.baseBranch) + '\n' +
196- 'git merge ' + u.escape(pr.headBranch) + '\n' +
197- 'git push ssb ' + u.escape(pr.baseBranch) +
198- '</pre>' +
199- '</div></section>'),
180 + !self.web.isPublic && pr.open && pull.once(`
181 + <section class="merge-instructions">
182 + <input type="checkbox" class="toggle" id="merge-instructions"/>
183 + <h4><label for="merge-instructions" class="toggle-link"><a>
184 + ${req._t('mergeInstructions.MergeViaCmdLine')}
185 + </a></label></h4>
186 + <div class="contents">
187 + <p>${req._t('mergeInstructions.CheckOut')}</p>
188 + <pre>
189 +git fetch ssb://${u.escape(pr.headRepo)} ${u.escape(pr.headBranch)}
190 +git checkout -b ${u.escape(pr.headBranch)} FETCH_HEAD</pre>
191 + <p>${req._t('mergeInstructions.MergeAndPush')}</p>
192 + <pre>
193 +git checkout ${u.escape(pr.baseBranch)}
194 +git merge ${u.escape(pr.headBranch)}
195 +git push ssb ${u.escape(pr.baseBranch)}</pre>
196 + </div></section>`),
200197 !self.web.isPublic && u.readOnce(function (cb) {
201198 cb(null, forms.issueComment(req, pr, repo, newestMsg.key,
202199 req._t('pull request')))
203200 })
package.jsonView
@@ -1,7 +1,7 @@
11 {
22 "name": "git-ssb-web",
3- "version": "2.3.5",
3 + "version": "2.3.6",
44 "description": "web server for browsing git repos on ssb",
55 "bin": "server.js",
66 "dependencies": {
77 "asyncmemo": "^0.1.0",
@@ -11,9 +11,9 @@
1111 "moment": "^2.14.1",
1212 "multicb": "^1.2.1",
1313 "node-polyglot": "^1.0.0",
1414 "pull-cat": "^1.1.8",
15- "pull-git-pack": "^0.2.0",
15 + "pull-git-pack": "^0.2.3",
1616 "pull-git-repo": "^0.6.1",
1717 "pull-hyperscript": "^0.2.1",
1818 "pull-identify-filetype": "^1.1.0",
1919 "pull-many": "^1.0.6",
@@ -21,14 +21,14 @@
2121 "pull-stream": "^3.1.0",
2222 "ssb-client": "^4.2.1",
2323 "ssb-config": "^2.1.1",
2424 "ssb-git-repo": "^2.3.0",
25- "ssb-issues": "^0.2.0",
25 + "ssb-issues": "^0.3.0",
2626 "ssb-keys": "^6.1.1",
2727 "ssb-marked": "^0.6.0",
2828 "ssb-mentions": "^0.1.0",
2929 "ssb-msg-schemas": "^6.1.1",
30- "ssb-pull-requests": "^0.2.2",
30 + "ssb-pull-requests": "^0.2.3",
3131 "ssb-reconnect": "^0.1.0",
3232 "ssb-ref": "^2.6.1",
3333 "stream-to-pull-stream": "^1.7.2"
3434 },

Built with git-ssb-web