skip news check if github.actor is pre-commit-ci[bot]#12614
skip news check if github.actor is pre-commit-ci[bot]#12614shenxianpeng wants to merge 4 commits intopypa:mainfrom
github.actor is pre-commit-ci[bot]#12614Conversation
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.
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)