fix(ci): use GitHub compare API for changelog author resolution (#5504)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
James Rich
2026-05-19 12:19:17 -07:00
committed by GitHub
parent 6c51c1ac18
commit 4ff6f23c5e
2 changed files with 218 additions and 214 deletions
+6 -2
View File
@@ -101,10 +101,14 @@ jobs:
| sed -e :a -e '/^\n*$/{$d;N;ba}'
}
# Helper: generate notes using git log (works between any two refs)
# Helper: generate notes using GitHub compare API (works between any two refs)
generate_notes_git() {
local from_ref="$1" to_ref="$2"
git log --no-merges --format="* %s by @%an in [\`%h\`](https://github.com/${REPO}/commit/%H)" "$from_ref".."$to_ref" 2>/dev/null || true
gh api "repos/${REPO}/compare/${from_ref}...${to_ref}" \
--jq '.commits[]
| select(.parents | length == 1)
| "* \(.commit.message | split("\n")[0]) by \(.commit.author.name) (@\(.author.login // .commit.author.name)) in [`\(.sha[0:9])`](https://github.com/'"${REPO}"'/commit/\(.sha))"' \
2>/dev/null || true
}
# Helper: demote ### headings to #### for nesting under channel sections