Skip to content

Commit c8a00d5

Browse files
committed
Prevent builds from being reported as broken
1 parent a6c5218 commit c8a00d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/block-builder.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports.getButton = ({title, url}) => {
3535

3636
module.exports.getFallbackBlocks = ({jobStatus, payload, eventName}) => {
3737
const repoName = `*<${payload.repository.html_url}|${payload.repository.full_name}>*`;
38-
const success = jobStatus === 'Success';
38+
const success = jobStatus.toLowerCase() === 'success';
3939
const author = `<${payload.sender.html_url}|${payload.sender.login}>`;
4040
const emoji = success ? ':thumbsup:' : ':thumbsdown:';
4141
const eventLink = `<${payload.repository.html_url}|${eventName}>`;
@@ -66,7 +66,7 @@ module.exports.getCommitListMessage = ({commits}) => {
6666

6767
module.exports.getPushBlocks = ({jobStatus, payload, runId}) => {
6868
const repoName = `*<${payload.repository.html_url}|${payload.repository.full_name}>*`;
69-
const success = jobStatus === 'Success';
69+
const success = jobStatus.toLowerCase() === 'success';
7070
const emoji = success ? ':thumbsup:' : ':thumbsdown:';
7171
const ref = payload.ref;
7272
const isProd = ref === 'refs/heads/prod';
@@ -96,7 +96,7 @@ module.exports.getPushBlocks = ({jobStatus, payload, runId}) => {
9696
};
9797

9898
module.exports.getPullRequestBlocks = ({jobStatus, payload, runId}) => {
99-
const success = jobStatus === 'Success';
99+
const success = jobStatus.toLowerCase() === 'success';
100100
const pullRequest = payload.pull_request;
101101

102102
const repoName = `*<${payload.repository.html_url}|${payload.repository.full_name}>*`;

0 commit comments

Comments
 (0)