-
Notifications
You must be signed in to change notification settings - Fork 3k
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
skip news check if github.actor
is pre-commit-ci[bot]
#12614
Conversation
Co-authored-by: Pradyun Gedam <[email protected]>
Now it's ready for review. |
if: "!contains(github.event.pull_request.labels.*.name, 'skip news')" | ||
if: | | ||
!contains(github.event.pull_request.labels.*.name, 'skip news') || | ||
github.actor != 'pre-commit-ci[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.
Is the logical OR here correct?
If the skip news label isn't present, the first condition in the if statement evaluates to True
, if the github actor is pre-commit-ci[bot] then the second condition evaluates to False
. True
OR False
is True
, so the check will be required.
Further if the skip news label is present but the actor is not pre-commit-ci[bot], then this will be True
or False
which is True
, and so skip news will now no longer work unless the actor is pre-commit-ci[bot].
I think the correct code here is:
if: |
!(contains(github.event.pull_request.labels.*.name, 'skip news')) &&
github.actor != 'pre-commit-ci[bot]'
But let me know if I missed something.
Do we even need the GHA news file workflow now that we have the PSF Chronographer check? I'd imagine that it'd suffer from the same false positive, but we can ask the app's devs to add a way to address that. |
With #13107 merged, the news entry GHA workflow is gone. This PR isn't needed anymore. |
Resolves #12605 (comment) and #12608 (comment)