modeline, formatting, cleanup of attachments
This commit is contained in:
parent
817a367367
commit
4597eebb18
|
@ -1,4 +1,5 @@
|
||||||
/*
|
/*
|
||||||
|
* vim: set syntax=javascript ts=2 sw=2 sts=2 et :
|
||||||
* JS script to handle incomming github webhooks
|
* JS script to handle incomming github webhooks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -178,13 +179,12 @@ const githubEvents = {
|
||||||
|
|
||||||
var atts = []
|
var atts = []
|
||||||
for ( var i = 0 ; i < commits.length ; i++ ) {
|
for ( var i = 0 ; i < commits.length ; i++ ) {
|
||||||
var attachment = {
|
var attachment = {
|
||||||
author_icon: 'https://cloud.githubusercontent.com/assets/51996/13893698/c047133c-ed2e-11e5-9233-13622bcb9b7b.png',
|
author_icon: 'https://cloud.githubusercontent.com/assets/51996/13893698/c047133c-ed2e-11e5-9233-13622bcb9b7b.png',
|
||||||
fields: []
|
fields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
attachment.author_name = commits[i].author.name;
|
attachment.author_name = commits[i].author.name;
|
||||||
attachment.text = commits[i].message;
|
|
||||||
attachment.title_link = commits[i].url;
|
attachment.title_link = commits[i].url;
|
||||||
attachment.title = commits[i].message;
|
attachment.title = commits[i].message;
|
||||||
atts.push(attachment);
|
atts.push(attachment);
|
||||||
|
@ -193,11 +193,10 @@ const githubEvents = {
|
||||||
return {
|
return {
|
||||||
content: {
|
content: {
|
||||||
text: committer + ' pushed ' + commits.length + ' commit(s).',
|
text: committer + ' pushed ' + commits.length + ' commit(s).',
|
||||||
attachments: atts
|
attachments: atts
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Script {
|
class Script {
|
||||||
|
|
Loading…
Reference in New Issue