-
Notifications
You must be signed in to change notification settings - Fork 107
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 comment when warn-only: true and comment-summary-in-pr: on-failure #817
Comments
A rough example of the PR is available here: main...ebickle:dependency-review-action:fix/comment-warn-only. Note that the total number of failures is bubbled up to the |
Hi @ebickle !
just so that i understand, you want to do it this way instead of using |
re:
I love this idea! lets discuss it in a separate issue, however, just to keep this one focused |
That's correct! I'm looking at deploying the action in a required workflow for thousands of repositories. To reduce developer impact during the rollout and ongoing operation the idea is to have the workflow succeed ( I've since moved to an approach that adds a commit check instead so it's not something I directly need any longer, but it seems like a valuable change that I'm happy to toss a PR in for. |
Please feel free to. It may take the team a little bit to get to a review, but it seems like a useful change to have. |
+1 I'm also looking at integrating this action into a reusable workflow used by hundreds of repositories. The ideal initial rollout would be to only warn about failures (in the form of a PR comment) while the workflow succeeds; in a bid to keep the noise and toil down for developers, while at the same time making them aware of security issues. |
Just to add this into the same conversation, as I too agree that it should comment only when it detects a failure, when we set [comment](comment-summary-in-pr: on-failure), and if the dependency_review action is running on a PR, then it does not remove the comment on the PR when the Vuln is fixed.
This leads to improper comments in PR. Quite an interesting enhancement to have. Can it be prioritised? |
I'm looking to deploy dependency-review-action using a required workflow to ensure that all developers are aware of dependency issues when pull requests are opened.
Since the required workflow rule will be applied to every repository:
The action input
warn-only: true
disables errors. The action inputcomment-summary-in-pr: on-failure
avoids adding a comment on every pull request. However, they are used at the same time, no comment summary is added. This is because the comment summary is only added if the entire action will fail with an exit code (core.setFailure
) not if a dependency review "rule" fails.Would you be open to having me submit a pull request for the following?
comment-summary-in-pr: on-failure
so that a comment is added if any dependency review failure occurs, even ifwarn-only: true
is set.In addition, if you're open to additional changes, I'd like to open a second pull request to have dependency review optionally create a pull request status check that is independent of the workflow. This would allow the dependency review action to work similarly to CodeQL - the success of the action itself would be (optionally) independent from the "dependency failures", allowing developers to enforce that dependency review is "run" but still have granular control over whether or not the dependency check "report" itself is enforced. This would be a more involved PR, so I'd like to do it after the 'quick fix' to
comment-summary-in-pr: on-failure
.The text was updated successfully, but these errors were encountered: