Skip to content

Commit

Permalink
fix: always diff against the remote branch (#3064)
Browse files Browse the repository at this point in the history
the check fails if we're targeting a branch that is not the default
branch.
Since we run git fetch before the diff, we know for a fact that
the remote branch exist so just specify the remote and use the
remote branch in the diff.
  • Loading branch information
kruskall authored Sep 11, 2024
1 parent 4f0d390 commit 1439496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .buildkite/scripts/build_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if [[ "${GITHUB_PR_BASE_REPO}" != 'docs' ]]; then

if [[ "${GITHUB_PR_BASE_REPO}" == 'apm-agent-go' ]]; then
git fetch origin "$GITHUB_PR_TARGET_BRANCH"
docs_diff=$(git diff --stat "$GITHUB_PR_TARGET_BRANCH"...HEAD -- ./docs CHANGELOG.asciidoc)
docs_diff=$(git diff --stat "origin/$GITHUB_PR_TARGET_BRANCH"...HEAD -- ./docs CHANGELOG.asciidoc)
else
docs_diff="always build"
fi
Expand Down

0 comments on commit 1439496

Please sign in to comment.