diff --git a/lib/Gitlab/Events/note-commit.js b/lib/Gitlab/Events/note-commit.js index c48ec0a..e3716b4 100644 --- a/lib/Gitlab/Events/note-commit.js +++ b/lib/Gitlab/Events/note-commit.js @@ -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, }; diff --git a/lib/Gitlab/Events/note-issue.js b/lib/Gitlab/Events/note-issue.js index 8a44b73..d1a2b7e 100644 --- a/lib/Gitlab/Events/note-issue.js +++ b/lib/Gitlab/Events/note-issue.js @@ -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, }; diff --git a/lib/Gitlab/Events/note-mergerequest.js b/lib/Gitlab/Events/note-mergerequest.js index 3be4ed3..92f28f4 100644 --- a/lib/Gitlab/Events/note-mergerequest.js +++ b/lib/Gitlab/Events/note-mergerequest.js @@ -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, }; diff --git a/lib/Gitlab/Events/push.js b/lib/Gitlab/Events/push.js index caca9cf..81630c0 100644 --- a/lib/Gitlab/Events/push.js +++ b/lib/Gitlab/Events/push.js @@ -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, diff --git a/lib/Gitlab/Events/tag_push.js b/lib/Gitlab/Events/tag_push.js index 0b2aba4..ebd1f8c 100644 --- a/lib/Gitlab/Events/tag_push.js +++ b/lib/Gitlab/Events/tag_push.js @@ -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 ? '...' : ''}`,