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
Branches
Tags
No related merge requests found
......@@ -57,8 +57,15 @@ exports.initWebApp = function(options) {
return '[' + text + '](' + url + ')';
};
var image = function(alt, url) {
return '![' + alt + '](' + url + ')';
var image = function(alt, url, width, height) {
var size = '';
if (width != undefined) {
size = ' =' + width + 'x';
if (height != undefined) {
size += height;
}
}
return '![' + alt + '](' + url + size + ')';
};
var getHook = function(check) {
......
......@@ -60,7 +60,7 @@ GitHubTrackerSource.prototype.notifyItem = function(item) {
GitHubTrackerSource.prototype.renderItem = function(item, linkCB, imageCB) {
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,
title = item.subject.title,
type = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment