verify-action-build: pass cleanly on removal-only PRs#820
Merged
Conversation
The --from-pr branch fails for removal-only PRs (e.g. #818) because extract_action_refs_from_diff correctly returns no refs when a PR only removes entries — there's nothing new to verify. The CLI treated that as a fatal error. Distinguish the two empty-result cases: a diff-fetch failure still exits 1, while a successfully-fetched diff with no added refs exits 0 with a "nothing to verify" message.
dave2wave
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--from-prbranch was failing on removal-only PRs (e.g. allowlist: remove browser-actions/setup-geckodriver and /setup-firefox #818) because there are no added action references to verify —extract_action_refs_from_diffcorrectly returns an empty list, but the CLI treated that as a fatal error.Why
Removal PRs (and any PR that touches
actions.yml/approved_patterns.ymlwithout adding a new pinned SHA) shouldn't fail the verify check — there's literally nothing to verify. PR #818 hit this because it only removes entries.Test plan
uv run pytest utils/tests/— 223 passedtest_cli.py:test_from_pr_with_no_added_refs_passes— removal-only diff exits 0test_from_pr_when_diff_fetch_fails_errors— None diff exits 1🤖 Generated with Claude Code