-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add danger to start automating some code review tasks #1251
Conversation
Generated by 🚫 dangerJS |
Codecov Report
@@ Coverage Diff @@
## master #1251 +/- ##
========================================
Coverage 13.73% 13.73%
========================================
Files 207 207
Lines 4638 4638
Branches 518 648 +130
========================================
Hits 637 637
+ Misses 3545 3448 -97
- Partials 456 553 +97
Continue to review full report at Codecov.
|
const foundLabels = intersection(requiredLabels, labels); | ||
if (isEmpty(foundLabels)) { | ||
fail(`PR is not labeled with one of: ${JSON.stringify(requiredLabels)}`); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, but only if you consider that an org contributor can set labels - so an OSS contribution wouldn't be able to do this - so it might be worth changing it to warn ( or to check whether the PR author is in the storybooks org )
https://travis-ci.org/storybooks/storybook/builds/241739179#L1335
|
I don't think the CI should fail on this? Shouldn't danger have it's own status? |
This run was specifically set to fail if specific labels were missed - so an exit code of 1 is OK, I think you can give Danger access to set a CI status independently of write access to a repo, which should make it show as one of the checks above |
@orta I agree with @ndelangen that it should just show up as a failing check like any of the other services above (e.g. codefactor, codecov, etc.) I have just expanded the token access to commit status now, but |
I think so, I know the ruby version does this - unsure if the JS version does |
@orta Looks like it does not, so I filed this issue: danger/danger-js#279 I'll try to take a whack at it at some point. In the meantime, I've converted it to a warning so that it does not break the build. |
Issue: N/A
What I did
How to test
Modify this PR and wait for messages from @storybookbot