Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Prepare for rename of default complement branch (#11971)
Browse files Browse the repository at this point in the history
use `HEAD` rather than hardcoding `master`
  • Loading branch information
richvdh authored Feb 11, 2022
1 parent 0171fa5 commit bb98c59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ jobs:
path: synapse

# Attempt to check out the same branch of Complement as the PR. If it
# doesn't exist, fallback to master.
# doesn't exist, fallback to HEAD.
- name: Checkout complement
shell: bash
run: |
Expand All @@ -358,8 +358,8 @@ jobs:
# for pull requests, otherwise GITHUB_REF).
# 2. Attempt to use the base branch, e.g. when merging into release-vX.Y
# (GITHUB_BASE_REF for pull requests).
# 3. Use the default complement branch ("master").
for BRANCH_NAME in "$GITHUB_HEAD_REF" "$GITHUB_BASE_REF" "${GITHUB_REF#refs/heads/}" "master"; do
# 3. Use the default complement branch ("HEAD").
for BRANCH_NAME in "$GITHUB_HEAD_REF" "$GITHUB_BASE_REF" "${GITHUB_REF#refs/heads/}" "HEAD"; do
# Skip empty branch names and merge commits.
if [[ -z "$BRANCH_NAME" || $BRANCH_NAME =~ ^refs/pull/.* ]]; then
continue
Expand Down
1 change: 1 addition & 0 deletions changelog.d/11971.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prepare for rename of default complement branch.

0 comments on commit bb98c59

Please # to comment.