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 AMParent: 14c6604e9dbde43363ceabea4f528ced348c5652
Parent: 8da0b6c786cd7465b74bf18c25423cc4722a1397
Files changed
README.md | changed |
index.js | changed |
lib/repos/index.js | changed |
lib/repos/pulls.js | changed |
package.json | changed |
README.md | ||
---|---|---|
@@ -5,8 +5,9 @@ | ||
5 | 5 … | Public installations: |
6 | 6 … | |
7 | 7 … | - https://gitmx.com/ |
8 | 8 … | - https://git-ssb.celehner.com/ |
9 … | +- http://git.mixmix.io/ | |
9 | 10 … | |
10 | 11 … | ## Install |
11 | 12 … | ``` |
12 | 13 … | npm install -g git-ssb-web |
index.js | ||
---|---|---|
@@ -790,13 +790,12 @@ | ||
790 | 790 … | |
791 | 791 … | var search = new RegExp(q, 'i') |
792 | 792 … | return this.serveTemplate(req, req._t('Search') + ' · ' + q, 200)( |
793 | 793 … | this.renderFeed(req, null, function (opts) { |
794 | - opts.type == 'about' | |
795 | 794 … | return function (read) { |
796 | 795 … | return pull( |
797 | 796 … | many([ |
798 | - self.getRepoNames(opts), | |
797 … | + self.getMsgs('about', opts), | |
799 | 798 … | read |
800 | 799 … | ]), |
801 | 800 … | pull.filter(function (msg) { |
802 | 801 … | var c = msg.value.content |
@@ -811,21 +810,15 @@ | ||
811 | 810 … | }) |
812 | 811 … | ) |
813 | 812 … | } |
814 | 813 … | |
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 … | + }) | |
828 | 821 … | } |
829 | 822 … | |
830 | 823 … | G.serveBlobNotFound = function (req, repoId, err) { |
831 | 824 … | return this.serveTemplate(req, req._t('error.BlobNotFound'), 404)(pull.once( |
lib/repos/index.js | ||
---|---|---|
@@ -252,9 +252,9 @@ | ||
252 | 252 … | }) |
253 | 253 … | }) |
254 | 254 … | } |
255 | 255 … | |
256 | -R.serveEmptyRepo = function (req, repo) { | |
256 … | +R.renderEmptyRepo = function (req, repo) { | |
257 | 257 … | if (repo.feed != this.web.myId) |
258 | 258 … | return this.renderRepoPage(req, repo, 'code', null, null, |
259 | 259 … | h('section', [ |
260 | 260 … | h('h3', req._t('EmptyRepo')) |
@@ -302,9 +302,9 @@ | ||
302 | 302 … | ]), |
303 | 303 … | rev ? cat([ |
304 | 304 … | h('section', {class: 'files'}, renderRepoTree(req, repo, rev, path)), |
305 | 305 … | this.renderRepoReadme(req, repo, rev, path) |
306 | - ]) : this.serveEmptyRepo(req, repo) | |
306 … | + ]) : this.renderEmptyRepo(req, repo) | |
307 | 307 … | ])) |
308 | 308 … | } |
309 | 309 … | |
310 | 310 … | /* Repo activity */ |
lib/repos/pulls.js | ||
---|---|---|
@@ -176,28 +176,25 @@ | ||
176 | 176 … | return self.repo.issues.renderIssueActivityMsg(req, repo, pr, |
177 | 177 … | req._t('pull request'), postId, item) |
178 | 178 … | }) |
179 | 179 … | ), |
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>`), | |
200 | 197 … | !self.web.isPublic && u.readOnce(function (cb) { |
201 | 198 … | cb(null, forms.issueComment(req, pr, repo, newestMsg.key, |
202 | 199 … | req._t('pull request'))) |
203 | 200 … | }) |
package.json | ||
---|---|---|
@@ -1,7 +1,7 @@ | ||
1 | 1 … | { |
2 | 2 … | "name": "git-ssb-web", |
3 | - "version": "2.3.5", | |
3 … | + "version": "2.3.6", | |
4 | 4 … | "description": "web server for browsing git repos on ssb", |
5 | 5 … | "bin": "server.js", |
6 | 6 … | "dependencies": { |
7 | 7 … | "asyncmemo": "^0.1.0", |
@@ -11,9 +11,9 @@ | ||
11 | 11 … | "moment": "^2.14.1", |
12 | 12 … | "multicb": "^1.2.1", |
13 | 13 … | "node-polyglot": "^1.0.0", |
14 | 14 … | "pull-cat": "^1.1.8", |
15 | - "pull-git-pack": "^0.2.0", | |
15 … | + "pull-git-pack": "^0.2.3", | |
16 | 16 … | "pull-git-repo": "^0.6.1", |
17 | 17 … | "pull-hyperscript": "^0.2.1", |
18 | 18 … | "pull-identify-filetype": "^1.1.0", |
19 | 19 … | "pull-many": "^1.0.6", |
@@ -21,14 +21,14 @@ | ||
21 | 21 … | "pull-stream": "^3.1.0", |
22 | 22 … | "ssb-client": "^4.2.1", |
23 | 23 … | "ssb-config": "^2.1.1", |
24 | 24 … | "ssb-git-repo": "^2.3.0", |
25 | - "ssb-issues": "^0.2.0", | |
25 … | + "ssb-issues": "^0.3.0", | |
26 | 26 … | "ssb-keys": "^6.1.1", |
27 | 27 … | "ssb-marked": "^0.6.0", |
28 | 28 … | "ssb-mentions": "^0.1.0", |
29 | 29 … | "ssb-msg-schemas": "^6.1.1", |
30 | - "ssb-pull-requests": "^0.2.2", | |
30 … | + "ssb-pull-requests": "^0.2.3", | |
31 | 31 … | "ssb-reconnect": "^0.1.0", |
32 | 32 … | "ssb-ref": "^2.6.1", |
33 | 33 … | "stream-to-pull-stream": "^1.7.2" |
34 | 34 … | }, |
Built with git-ssb-web