diff --git a/js/main.js b/js/main.js
index 1236544..044ebca 100644
--- a/js/main.js
+++ b/js/main.js
@@ -30,40 +30,46 @@ $(document).ready(function(){
let show = event_type;
switch (event_type) {
case "CommitCommentEvent":
+ show = user + ' commented on ' + activity.comment.commit_id.substring(0,10) +
+ ' at ' + repo + '' + activity.comment.body;
break;
case "CreateEvent":
break;
case "DeleteEvent":
- break;
- case "DownloadEvent":
- break;
- case "FollowEvent":
- show = user + ' started following ' + activity.payload.target.login + "
at " + repo + "
";
+ var ref = activity.payload.ref,
+ ref_type = activity.payload.ref_type;
+ show = user + " deleted " + ref_type + " " + ref + " at " + repo + "
";
break;
case "ForkEvent":
- show = " forked " + repo + ' into ' + activity.payload.forkee.full_name + "
";
- break;
- case "ForkApplyEvent":
- break;
- case "GistEvent":
+ show = user + "forked" + repo + 'into ' + activity.payload.forkee.full_name + "
";
break;
case "GollumEvent":
break;
case "IssueCommentEvent":
+ var converter = new showdown.Converter();
+ var body = truncate (activity.payload.issue.body, 250);
+ body = converter.makeHtml(body);
+ show = user + " commented on issue: " + repo + ' / ' +
+ activity.payload.issue.title + "" + body + "
";
break;
case "IssuesEvent":
var converter = new showdown.Converter(),
action = activity.payload.action,
- body = activity.payload.issue.body.length > 250 ? activity.payload.issue.body.substring(0, 249) + "..." : activity.payload.issue.body;
+ body = truncate(activity.payload.issue.body, 250);
body = converter.makeHtml(body);
- show = user + " " + action + " issue " + repo + ' / ' + activity.payload.issue.title + "" + body + "
", action
+ show = user + " " + action + " issue at " + repo + '' + ': ' + activity.payload.issue.title +
+ "" + body + "
";
break;
case "MemberEvent":
break;
case "PublicEvent":
+ show = user + ' made ' + repo + ' public';
break;
case "PullRequestEvent":
- show = user + " " + activity.payload.action + ' a pull request: ' + activity.repo.name + "/#" + activity.payload.number + '' + activity.payload.pull_request.head.sha.substring(0, 10) + " " + activity.payload.pull_request.title + "
";
+ show = user + " " + activity.payload.action + ' a pull request:' + activity.repo.name + "/#" + activity.payload.number + '' + activity.payload.pull_request.head.sha.substring(0, 10) + " " + activity.payload.pull_request.title + "
";
break;
case "PullRequestReviewCommentEvent":
break;
@@ -83,18 +89,18 @@ $(document).ready(function(){
for (; count >= ii;) body += '' + activity.payload.commits[ii - 1].sha.substring(0, 10) + " " + (activity.payload.commits[ii - 1].message.length > 250 ? activity.payload.commits[ii - 1].message.substring(0, 249) + "..." : activity.payload.commits[ii - 1].message) + "
", ii++;
body += 'compare these commits »'
}
- show = user +" pushed " + count + " " + commit + ' to ' + ref + " at " + repo + "
" + body;
+ show = user +" pushed " + count + " " + commit + ' to ' + ref + " at " + repo + "
" + body;
break;
case "ReleaseEvent":
- show = user + ' released ' + activity.payload.release.name +
- " at " + repo + "
";
+ "
";
break;
case "TeamAddEvent":
break;
case "WatchEvent":
- show = "
${repo.description}
+${desc}