Commit a764cfc
fix(ci): use tree-hash anchor for accurate promotion commit list (ublue-os#1197)
... and of course I messed it up, one more. :)
## Solution
Find the most-recent commit on `main` whose tree hash matches the
current `lts` tree. Since squash-merges preserve content exactly, this
is always the `main` commit that was squash-merged into `lts`. `git log`
is anchored from that point, showing only genuinely new commits
regardless of squash-merge history.
If no match is found within 500 commits (first-ever promotion), falls
back to `git diff --name-status`.
## Also fixed
- Removed `|| true` from `gh pr edit` — failures now surface visibly
instead of silently leaving the PR body stale
- Added guard: if `git diff` detects a difference but
`origin/lts..origin/main` is empty (lts is ahead/diverged), skip rather
than open a misleading empty PR
Addresses Copilot review comments from ublue-os#1195.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6462f99 commit a764cfc
2 files changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
| |||
66 | 82 | | |
67 | 83 | | |
68 | 84 | | |
69 | | - | |
| 85 | + | |
70 | 86 | | |
71 | 87 | | |
72 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
0 commit comments