Skip to content

Commit

Permalink
Fix default branch in resolve_diffbase
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorcloudy committed Feb 21, 2024
1 parent 38ab00b commit 82d8e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildkite/bazelci.py
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,7 @@ def resolve_diffbase(diffbase):
base_branch = os.getenv("BUILDKITE_PULL_REQUEST_BASE_BRANCH", "")
# Fallback to the default branch for this repository if BUILDKITE_PULL_REQUEST_BASE_BRANCH is not set.
if not base_branch:
base_branch = os.getenv("BUILDKITE_BRANCH", "")
base_branch = os.getenv("BUILDKITE_PIPELINE_DEFAULT_BRANCH", "")
execute_command(["git", "fetch", "origin", base_branch])
return execute_command_and_get_output(["git", "merge-base", "HEAD", 'FETCH_HEAD']).strip()
elif COMMIT_RE.fullmatch(diffbase):
Expand Down

0 comments on commit 82d8e77

Please sign in to comment.