git ssb

30+

cel / git-ssb-web



Commit 12cbbc0fcd92a745f0439eff6cad0263ed4a8fcc

Serve line-comment messages and replies

cel committed on 11/24/2017, 4:25:26 AM
Parent: d216b0353c9628c01e54c1dd05521f2708d6ba1b

Files changed

index.jschanged
lib/repos/index.jschanged
index.jsView
@@ -794,8 +794,15 @@
794794 cb(null, self.repos.pulls.serveRepoPullReq(req,
795795 GitRepo(repo), pr, path))
796796 })
797797 })
798 + case 'line-comment':
799 + return self.getRepo(c.repo, function (err, repo) {
800 + if (err) return cb(null,
801 + self.repos.serveRepoNotFound(req, c.repo, err))
802 + return cb(null,
803 + self.repos.serveRepoCommit(req, GitRepo(repo), c.commitId, c.filename))
804 + })
798805 case 'issue-edit':
799806 if (ref.isMsgId(c.issue)) {
800807 return self.pullReqs.get(c.issue, function (err, issue) {
801808 if (err) return cb(err)
@@ -850,8 +857,13 @@
850857 return cb(null,
851858 self.repos.pulls.serveRepoPullReq(req,
852859 GitRepo(repo), pr, path, id))
853860 })
861 + case 'line-comment':
862 + return cb(null,
863 + self.repos.serveRepoCommit(req, GitRepo(repo), rc.commitId, rc.filename))
864 + default:
865 + return cb(null, self.serveGenericMessage(req, msg, path))
854866 }
855867 })
856868 })
857869 }
lib/repos/index.jsView
@@ -197,9 +197,9 @@
197197 return this.serveRepoActivity(req, repo, branch)
198198 case 'commits':
199199 return this.serveRepoCommits(req, repo, branch)
200200 case 'commit':
201- return this.serveRepoCommit(req, repo, path[1])
201 + return this.serveRepoCommit(req, repo, path[1], filePath)
202202 case 'tag':
203203 return this.serveRepoTag(req, repo, branch, filePath)
204204 case 'tree':
205205 return this.serveRepoTree(req, repo, branch, filePath)
@@ -700,9 +700,10 @@
700700 }
701701
702702 /* Repo commit */
703703
704-R.serveRepoCommit = function (req, repo, rev) {
704 +R.serveRepoCommit = function (req, repo, rev, filePath) {
705 + // TODO: use filePath argument
705706 var self = this
706707 return u.readNext(function (cb) {
707708 repo.getCommitParsed(rev, function (err, commit) {
708709 if (err) return cb(null,

Built with git-ssb-web