Skip to content

Commit 8e53abc

Browse files
authored
[ci] pull main branch before diffing (#68983)
we tried to generate a full diff against main in ec9d80e but it resulted in wrong diffs. It seems that the issue was that 'main' was not updated after agent restart and diff main...HEAD kept growing. Not enabling diff main...HEAD just yet and will check logs for new PRs first.
1 parent c68bc17 commit 8e53abc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ set -o pipefail
2323
# Environment variables script works with:
2424
# List of files affected by this commit
2525
: ${MODIFIED_FILES:=$(git diff --name-only HEAD~1)}
26+
# Fetch origin/main to have an up to date merge base for main...HEAD diff.
27+
git fetch origin main:main
28+
echo "files modified HEAD~1" >&2
29+
git --no-pager diff --name-only HEAD~1 >&2
30+
echo "files modified main...HEAD" >&2
31+
git --no-pager diff --name-only main...HEAD | head -n 10 >&2
32+
merge_base=$(git merge-base main HEAD)
33+
echo "merge base with main $merge_base" >&2
34+
echo "git log" >&2
35+
git --no-pager log --oneline --abbrev-commit -n 5 >&2
2636
# Filter rules for generic windows tests
2737
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
2838
# Filter rules for generic linux tests

0 commit comments

Comments
 (0)