allowlist-check: verbose output and gh command to create allowlist PR#630
allowlist-check: verbose output and gh command to create allowlist PR#630potiuk merged 2 commits intoapache:mainfrom
Conversation
|
cc: @kevinjqliu -enhanced your action with exact instructions to the maintainers how to create a PR to |
|
Of course - literally two prompts to create it in less than 5 minues. |
|
d2bb8ce to
0154487
Compare
|
And third prompt:
Added nice colorful verbose output while checking the actions. |
dave2wave
left a comment
There was a problem hiding this comment.
Please provide clear for a human instructions on how to run a test.
It's already there added by @kevinjqliu (see https://github.com/apache/infrastructure-actions/blob/main/allowlist-check/README.md) - this PR merely improves the output of it by adding colors and improves the output to suggest a ready-to-copy-paste gh-command. |
raboof
left a comment
There was a problem hiding this comment.
this seems to promote discouraged behaviour
"It took me really little work to create this work for you" really isn't a selling point IMHO |
kevinjqliu
left a comment
There was a problem hiding this comment.
thanks! this is helpful.
thoughts on adding a helper script in this repo?
True |
When the check finds action refs not on the allowlist, print a ready-to-run shell script that forks apache/infrastructure-actions, appends wildcard entries to actions.yml, and opens a pull request — all via the gh CLI with no manual file editing required. Also add verbose output showing each action ref being checked, its status (allowed/not allowed), and the reason (trusted owner, matches allowlist, or not on allowlist).
fixup! allowlist-check: print gh command to create allowlist PR - Use pinned versions instead of wildcards in generated entries - Insert entries alphabetically via separate insert_actions.py script - Download insert_actions.py from raw GitHub instead of inlining - Push to fork and open PR from fork - Generate one PR command per action, encourage one PR per action
0154487 to
d4c18fd
Compare
|
All comments addressed @dave2wave @raboof @kevinjqliu |
|
Let me merge it here - I will check it on Airflow without releasing it, I think I addressed all comments, we can always fix it later, |

Summary
Two improvements to the allowlist-check action:
Verbose output: Each action ref is now printed as it is checked, showing its
status and the reason it was allowed or rejected. This makes it easy to see exactly
what the check is doing without digging through workflow files.
Ready-to-run
ghcommand: On failure, the check now prints a copy-pasteableshell script that forks the repo, appends wildcard entries to
actions.yml, andopens a PR — no manual file editing required.
Test plan
TestBuildGhPrCommand(3 tests): single action, multiple actions with dedup, same action with different SHAs.TestMainGhPrCommand(2 tests): verifies main() includes the PR command and verbose check output.