Commit 1e0609728aab38818c762fa422816c66ba7e5740
Add issue and repo properties to issue comments
Charles Lehner committed on 3/30/2016, 2:35:53 AMParent: 797cc992621024c5ae1349bd7c7cde7befa2d484
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -457,8 +457,10 @@ | ||
457 | 457 | if (!data.id) |
458 | 458 | return cb(null, serveError(new Error('Missing id'), 400)) |
459 | 459 | |
460 | 460 | var msg = schemas.post(data.text, data.id, data.branch || data.id) |
461 | + msg.issue = data.issue | |
462 | + msg.repo = data.repo | |
461 | 463 | if (data.open != null) |
462 | 464 | Issues.schemas.opens(msg, data.id) |
463 | 465 | if (data.close != null) |
464 | 466 | Issues.schemas.closes(msg, data.id) |
@@ -1487,8 +1489,10 @@ | ||
1487 | 1489 | function renderCommentForm(cb) { |
1488 | 1490 | cb(null, '<section><form action="" method="post">' + |
1489 | 1491 | '<input type="hidden" name="action" value="comment">' + |
1490 | 1492 | '<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 + '">' + | |
1491 | 1495 | '<input type="hidden" name="branch" value="' + newestMsg.key + '">' + |
1492 | 1496 | renderPostForm(repo) + |
1493 | 1497 | '<input type="submit" class="btn open" value="Comment" />' + |
1494 | 1498 | (isAuthor ? |
Built with git-ssb-web