Skip to content

Commit

Permalink
Prevent builds from being reported as broken
Browse files Browse the repository at this point in the history
  • Loading branch information
leopic committed Jun 26, 2020
1 parent a6c5218 commit c8a00d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/block-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports.getButton = ({title, url}) => {

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

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

module.exports.getPullRequestBlocks = ({jobStatus, payload, runId}) => {
const success = jobStatus === 'Success';
const success = jobStatus.toLowerCase() === 'success';
const pullRequest = payload.pull_request;

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

0 comments on commit c8a00d5

Please sign in to comment.