fix(ci): fetch depth 20 for merge group CI runs (#9500)

When a CI job is running as part of a merge group, it's possible the
base ref is a few commits away if the merge queue has items in it. So we
update the fetch depth to 20.
This commit is contained in:
Jamil
2025-06-10 11:30:59 -05:00
committed by GitHub
parent c3760e371c
commit be446a3d75

View File

@@ -49,7 +49,8 @@ jobs:
# Fetch base ref for merge_group
if [ "${{ github.event_name }}" = "merge_group" ]; then
git fetch origin ${{ github.event.merge_group.base_ref }} --depth=1
# Base ref could be a few commits away, so fetch a few commits in case the queue is long
git fetch origin ${{ github.event.merge_group.base_ref }} --depth=20
git diff --name-only ${{ github.event.merge_group.base_sha }} ${{ github.sha }} > changed_files.txt
echo "Changed files:"