diff --git a/index.js b/index.js
index b808ab6..c7aab4a 100644
--- a/index.js
+++ b/index.js
@@ -107,6 +107,7 @@ exports.init = function (sbot, config) {
paramap(addAuthorAbout, 8),
paramap(addFollowAbout, 8),
paramap(addVoteMessage, 8),
+ paramap(addGitLinks, 8),
pull(renderThread(defaultOpts), wrapPage(about.name)),
toPull(res, function (err) {
if (err) console.error('[viewer]', err)
@@ -296,6 +297,23 @@ exports.init = function (sbot, config) {
cb(null, msg)
})
}
+
+ function addGitLinks(msg, cb) {
+ if (msg.value.content.type == 'git-update')
+ getMsg(msg.value.content.repo, function (err, gitRepo) {
+ if (gitRepo)
+ msg.value.content.repoName = gitRepo.value.content.name
+ cb(null, msg)
+ })
+ else if (msg.value.content.type == 'issue')
+ getMsg(msg.value.content.project, function (err, gitRepo) {
+ if (gitRepo)
+ msg.value.content.repoName = gitRepo.value.content.name
+ cb(null, msg)
+ })
+ else
+ cb(null, msg)
+ }
}
function serveBlob(req, res, sbot, id) {
diff --git a/render.js b/render.js
index e9aac7c..56cf513 100644
--- a/render.js
+++ b/render.js
@@ -389,15 +389,16 @@ function render(opts, c) {
}
else if (c.type == "issue") {
return '' +
- "Created a git issue" +
- '' +
- renderDefault(c);
+ "Created a git issue" + (c.repoName != undefined ? " in repo " + c.repoName : "") + renderPost(opts, c) +
+ '';
+ //renderDefault(c);
}
else if (c.type == "git-update") {
return '' +
- "Did a git update" +
- '' +
- renderDefault(c);
+ "Did a git update " + (c.repoName != undefined ? " in repo " + c.repoName : "") +
+ "
" +
+ (c.commits != undefined ? c.commits.map(com => { return "-" +com.title; }).join("
") : "") +
+ ''
}
else if (c.type == "ssb-dns") {
return '' +