Skip to content
Snippets Groups Projects
Commit a55737aa authored by jurgenhaas's avatar jurgenhaas
Browse files

#7 Support fixed width for avatars in GitHub notifications

parent e3f5180c
No related branches found
No related tags found
No related merge requests found
...@@ -57,8 +57,15 @@ exports.initWebApp = function(options) { ...@@ -57,8 +57,15 @@ exports.initWebApp = function(options) {
return '[' + text + '](' + url + ')'; return '[' + text + '](' + url + ')';
}; };
var image = function(alt, url) { var image = function(alt, url, width, height) {
return '![' + alt + '](' + url + ')'; var size = '';
if (width != undefined) {
size = ' =' + width + 'x';
if (height != undefined) {
size += height;
}
}
return '![' + alt + '](' + url + size + ')';
}; };
var getHook = function(check) { var getHook = function(check) {
......
...@@ -60,7 +60,7 @@ GitHubTrackerSource.prototype.notifyItem = function(item) { ...@@ -60,7 +60,7 @@ GitHubTrackerSource.prototype.notifyItem = function(item) {
GitHubTrackerSource.prototype.renderItem = function(item, linkCB, imageCB) { GitHubTrackerSource.prototype.renderItem = function(item, linkCB, imageCB) {
var url = item.repository.html_url, var url = item.repository.html_url,
avatar = imageCB('', item.repository.owner.avatar_url), avatar = imageCB('', item.repository.owner.avatar_url, 50),
project = item.repository.full_name, project = item.repository.full_name,
title = item.subject.title, title = item.subject.title,
type = ''; type = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment