fix(compare-actions): flag tag mismatch as outdated even when SHAs match#6
Merged
Conversation
Previously, a pin of '@<sha> # v1' against an action whose latest release is 'v1.0.0' was reported as 'Up to date: (v1)' because the SHAs coincided (v1 floating tag currently points to v1.0.0's commit). The consumer's pin label never got refreshed, so logs showed the stale alias and the auto-update PR never fired. Now: current_tag != latest_tag triggers outdated-flag even with matching SHAs. apply-updates.sh already writes both sha + tag on rewrite, so the resulting PR cleanly updates '# v1' -> '# v1.0.0' (and '# v1.0.0' -> '# v1.0.1' when the next release arrives). Added bats coverage: - flags outdated when SHAs match but tags differ (the exact case here) - up-to-date when both SHAs and tags match exactly (regression guard) - up-to-date when SHAs match and current_tag is empty (empty-comment case where tag comparison is skipped)
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.
A pin of
@<sha> # v1against an action whose latest release isv1.0.0was being reported asUp to date: (v1)because the SHAs coincided (thev1floating tag currently points tov1.0.0's commit). The consumer's pin label never got refreshed — logs showed the stale alias, and the auto-update PR never fired.Observed during tinywhale pilot: the action reported itself as "Up to date: (v1)" even though v1.0.0 is the explicit release — the pin comment should be
v1.0.0, notv1.Fix
In
compare-actions.sh: treatcurrent_tag != latest_tagas outdated even when SHAs match (but only when both tags are non-empty, so consumers who pin without a#comment aren't affected).apply-updates.shalready writes both SHA and tag on rewrite, so the resulting PR cleanly refreshes# v1→# v1.0.0(and# v1.0.0→# v1.0.1on next release).Tests
Three new bats cases in
compare-actions.bats:#comment)Rollout
After merge: cut
v1.0.1, re-point floatingv1, publish Release. The next scheduled run in beacon/tinywhale will then auto-open a PR refreshing their# v1pins to# v1.0.1.