-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat(danger): Block PR if yarn audit has high or critical, do not run on dependabot, no warn on version #327
Conversation
3f14225
to
aec57bc
Compare
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.
A couple questions inline.
Also could you update contributing.md
dev notes - we list the actions that danger takes so this needs to be slightly adjusted (for what happens withyarn audit
).
Otherwise looks good!
dangerfile.ts
Outdated
// skip these checks if PR is by dependabot, if we don't have a github object let it run also since we are local | ||
if ( | ||
!danger.github || | ||
(danger.github && danger.github.pr.user.login !== 'dependabot-preview[bot]') |
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.
In other places (circleci config) we check for 'dependabot-preview[bot]' and `dependabot[bot]' . Assuming that's no longer needed? Just checking
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.
Not sure. I'll try to check
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.
I think I found a way to detect all bots, so I think that will do what we want
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.
Thanks for looking for into it 🚀
@@ -129,7 +129,7 @@ | |||
"husky": { | |||
"hooks": { | |||
"pre-commit": "tsc --noEmit && lint-staged", | |||
"pre-push": "yarn danger local --failOnErrors" | |||
"pre-push": "yarn danger local -b main --failOnErrors" |
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.
is running yarn danger local -b main --failOnErrors
locally supposed to work for me at this point?
I'm getting the Error: fatal: ambiguous argument 'master...HEAD': unknown revision or path not in the working tree.
error
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.
No, there hasn't been any more feedback on my bug report. Maybe I'll just open a PR
8e57aef
to
c1b511b
Compare
Summary
Update danger config to run
yarn audit
and block if high or critical issues are found.Do not run danger on dependabot PRs
Do not warn if the only changes the
package.json
is the versionRelated Issues or PRs
closes #324
How To Test
Screenshots (optional)