git ssb

30+

cel / git-ssb-web



Commit 1e0609728aab38818c762fa422816c66ba7e5740

Add issue and repo properties to issue comments

Charles Lehner committed on 3/30/2016, 2:35:53 AM
Parent: 797cc992621024c5ae1349bd7c7cde7befa2d484

Files changed

index.jschanged
index.jsView
@@ -457,8 +457,10 @@
457457 if (!data.id)
458458 return cb(null, serveError(new Error('Missing id'), 400))
459459
460460 var msg = schemas.post(data.text, data.id, data.branch || data.id)
461+ msg.issue = data.issue
462+ msg.repo = data.repo
461463 if (data.open != null)
462464 Issues.schemas.opens(msg, data.id)
463465 if (data.close != null)
464466 Issues.schemas.closes(msg, data.id)
@@ -1487,8 +1489,10 @@
14871489 function renderCommentForm(cb) {
14881490 cb(null, '<section><form action="" method="post">' +
14891491 '<input type="hidden" name="action" value="comment">' +
14901492 '<input type="hidden" name="id" value="' + issue.id + '">' +
1493+ '<input type="hidden" name="issue" value="' + issue.id + '">' +
1494+ '<input type="hidden" name="repo" value="' + repo.id + '">' +
14911495 '<input type="hidden" name="branch" value="' + newestMsg.key + '">' +
14921496 renderPostForm(repo) +
14931497 '<input type="submit" class="btn open" value="Comment" />' +
14941498 (isAuthor ?

Built with git-ssb-web