Commit 910163e
authored
fix(compare-actions): flag tag mismatch as outdated even when SHAs match (#6)
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)1 parent c10e61a commit 910163e
2 files changed
Lines changed: 43 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
0 commit comments