diff --git a/htdocs/site/js/github.js b/htdocs/site/js/github.js
index f39fc0d27..4ba9eda48 100644
--- a/htdocs/site/js/github.js
+++ b/htdocs/site/js/github.js
@@ -10,9 +10,24 @@ jQuery.fn.listCommits = function(username, repository, branch) {
var list = $('
');
target.empty().append(list);
$(repos).each(function(i) {
- list.append('' + this.message + ' by ' + this.author.login + '');
+ var githubUrl = 'https://github.com' + this.url;
+ var shortMessage = cutLines(this.message);
+ var author = this.author.login;
+ if (author == '') {
+ author = this.author.name;
+ }
+
+ list.append('' + shortMessage + ' by ' + author + '');
if (i == 9) return false;
});
});
+
+ function cutLines(message) {
+ var lineFeed = message.indexOf("\n");
+ if (lineFeed > -1) {
+ return message.slice(0, lineFeed);
+ }
+ return message;
+ }
};
\ No newline at end of file