GHA AUTHORS check: handle PRs from forks

where the ref names differ compared to own PRs. Instead refer to the base branch and the head branch via generic HEAD^<parent number> where HEAD is a merge commit.
This commit is contained in:
Alexander A. Klimov 2024-01-18 17:22:35 +01:00
parent d6a9628f4a
commit 82e9c71001
1 changed files with 2 additions and 2 deletions

View File

@ -20,8 +20,8 @@ jobs:
sort -uo AUTHORS AUTHORS
git add AUTHORS
git log --format='format:%aN <%aE>' "$(
git merge-base "origin/$GITHUB_BASE_REF" "origin/$GITHUB_HEAD_REF"
)..origin/$GITHUB_HEAD_REF" >> AUTHORS
git merge-base HEAD^1 HEAD^2
)..HEAD^2" >> AUTHORS
sort -uo AUTHORS AUTHORS
git diff AUTHORS >> AUTHORS.diff