Skip to content

Commit

Permalink
Update danger to post status rather than break the build
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jun 13, 2017
1 parent bbbdf54 commit 3682655
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dangerfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { warn, danger } from 'danger';
import { fail, danger } from 'danger';
import { flatten, intersection, isEmpty, includes } from 'lodash';

const pkg = require('./package.json'); // eslint-disable-line import/newline-after-import
Expand All @@ -11,12 +11,12 @@ const checkRequiredLabels = labels => {
]);

if (includes(labels, 'do not merge')) {
warn('PR is marked with "do not merge" label.');
fail('PR is marked with "do not merge" label.');
}

const foundLabels = intersection(requiredLabels, labels);
if (isEmpty(foundLabels)) {
warn(`PR is not labeled with one of: ${JSON.stringify(requiredLabels)}`);
fail(`PR is not labeled with one of: ${JSON.stringify(requiredLabels)}`);
}
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"babel-preset-stage-0": "^6.24.1",
"chalk": "^1.1.3",
"codecov": "^2.2.0",
"danger": "^0.20.0",
"danger": "^0.21.0",
"enzyme": "^2.8.2",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
Expand Down

0 comments on commit 3682655

Please sign in to comment.