Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/staging-aggregate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ jobs:
continue
fi

# Check the PR out first, so that all its files are here before the merge. If some
# are missing, git can ask the server for files the merge itself has just written,
# and fail ("upload-pack: not our ref").
git checkout -q --detach "$MERGE_REF" || echo "::warning::Loading the files of PR #$pr failed"
git checkout -q -f "$AGGREGATE_BRANCH"

# Try to merge into our aggregate branch
if git merge "$MERGE_REF" --no-edit; then
echo "✅ Successfully merged PR #$pr"
Expand All @@ -221,6 +227,9 @@ jobs:
git merge --abort
else
echo "::warning::Merging PR #$pr failed before conflict resolution (not a content conflict) - skipping"
# Such a merge can leave half-changed files behind, which the build would pick up.
git reset -q --hard
git clean -fdq
fi
fi
done
Expand Down