Skip to content

Commit

Permalink
fix(gitlab: events): fix embed colors by transiforming to 0x######
Browse files Browse the repository at this point in the history
  • Loading branch information
dsevillamartin committed Apr 15, 2017
1 parent 360d7b8 commit f3c8237
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Gitlab/Events/note-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class NoteCommit extends EventResponse {
const comment = data.object_attributes;
const sha = comment.commit_id.slice(0, 7);
return {
color: `#996633`,
color: 0x996633,
title: `Commented on commit \`${sha}\``,
description: comment.note,
};
Expand Down
2 changes: 1 addition & 1 deletion lib/Gitlab/Events/note-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class NoteIssue extends EventResponse {
const comment = data.object_attributes;
const issue = data.issue;
return {
color: `#996633`,
color: 0x996633,
title: `Commented on issue #${issue.iid}: \`${issue.title}\``,
description: comment.note,
};
Expand Down
2 changes: 1 addition & 1 deletion lib/Gitlab/Events/note-mergerequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class NoteMergeRequest extends EventResponse {
const comment = data.object_attributes;
const mergeRequest = data.merge_request;
return {
color: `#996633`,
color: 0x996633,
title: `Commented on merge request #${mergeRequest.iid}: \`${mergeRequest.title}\``,
description: comment.note,
};
Expand Down
2 changes: 1 addition & 1 deletion lib/Gitlab/Events/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Push extends EventResponse {

let description = pretext.join('\n');
return {
color: '7289DA',
color: 0x7289DA,
title: `Pushed ${data.total_commits_count} ${commits.length !== 1 ? 'commits' : 'commit'} to \`${branch}\``,
url: `${data.project.web_url}/compare/${data.before.slice(0, 7)}...${data.after.slice(0, 7)}`,
description,
Expand Down
2 changes: 1 addition & 1 deletion lib/Gitlab/Events/tag_push.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TagPush extends EventResponse {
const isCreated = this.isCreated(data);

return {
color: 'F0C330',
color: 0xF0C330,
title: `${this.isCreated(data) ? 'Created' : 'Deleted'} tag \`${tag}\` ${sha ? `from commit \`${sha}\`` : ''}${isCreated ? `with ${commitCount} ${commitCount !== 1 ? 'commits' : 'commit'}` : ''}`,
url: isCreated ? `${data.project.web_url}/tags/${tag}` : null,
description: `${message.slice(0, 2000)}${message.length > 2000 ? '...' : ''}`,
Expand Down

0 comments on commit f3c8237

Please sign in to comment.