mirror of https://github.com/Icinga/icinga2.git
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:
parent
d6a9628f4a
commit
82e9c71001
|
@ -20,8 +20,8 @@ jobs:
|
||||||
sort -uo AUTHORS AUTHORS
|
sort -uo AUTHORS AUTHORS
|
||||||
git add AUTHORS
|
git add AUTHORS
|
||||||
git log --format='format:%aN <%aE>' "$(
|
git log --format='format:%aN <%aE>' "$(
|
||||||
git merge-base "origin/$GITHUB_BASE_REF" "origin/$GITHUB_HEAD_REF"
|
git merge-base HEAD^1 HEAD^2
|
||||||
)..origin/$GITHUB_HEAD_REF" >> AUTHORS
|
)..HEAD^2" >> AUTHORS
|
||||||
sort -uo AUTHORS AUTHORS
|
sort -uo AUTHORS AUTHORS
|
||||||
git diff AUTHORS >> AUTHORS.diff
|
git diff AUTHORS >> AUTHORS.diff
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue