Switch to use merge branch for PR testing instead of HEAD Branch

This commit is contained in:
night1rider
2026-06-11 15:57:29 -06:00
parent bd78a42e9a
commit aa7b7defba
+4 -2
View File
@@ -48,9 +48,11 @@ jobs:
id: src
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# Fetch via upstream PR ref so renames, deletes, or visibility changes on the fork do not break us
# Fetch via upstream PR ref so renames, deletes, or visibility changes on the fork do not break us.
# Use the /merge ref (PR merged into the base branch) instead of /head so we test master+PR,
# picking up fixes already on master rather than testing the PR branch in isolation.
echo "repo=https://github.com/${{ github.repository }}" >> "$GITHUB_OUTPUT"
echo "branch=refs/pull/${{ github.event.pull_request.number }}/head" >> "$GITHUB_OUTPUT"
echo "branch=refs/pull/${{ github.event.pull_request.number }}/merge" >> "$GITHUB_OUTPUT"
else
echo "repo=https://github.com/${{ github.repository }}" >> "$GITHUB_OUTPUT"
echo "branch=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"