Skip to content
Snippets Groups Projects
Unverified Commit bb98c593 authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Prepare for rename of default complement branch (#11971)

use `HEAD` rather than hardcoding `master`
parent 0171fa52
No related branches found
No related tags found
No related merge requests found
...@@ -345,7 +345,7 @@ jobs: ...@@ -345,7 +345,7 @@ jobs:
path: synapse path: synapse
# Attempt to check out the same branch of Complement as the PR. If it # 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 - name: Checkout complement
shell: bash shell: bash
run: | run: |
...@@ -358,8 +358,8 @@ jobs: ...@@ -358,8 +358,8 @@ jobs:
# for pull requests, otherwise GITHUB_REF). # for pull requests, otherwise GITHUB_REF).
# 2. Attempt to use the base branch, e.g. when merging into release-vX.Y # 2. Attempt to use the base branch, e.g. when merging into release-vX.Y
# (GITHUB_BASE_REF for pull requests). # (GITHUB_BASE_REF for pull requests).
# 3. Use the default complement branch ("master"). # 3. Use the default complement branch ("HEAD").
for BRANCH_NAME in "$GITHUB_HEAD_REF" "$GITHUB_BASE_REF" "${GITHUB_REF#refs/heads/}" "master"; do for BRANCH_NAME in "$GITHUB_HEAD_REF" "$GITHUB_BASE_REF" "${GITHUB_REF#refs/heads/}" "HEAD"; do
# Skip empty branch names and merge commits. # Skip empty branch names and merge commits.
if [[ -z "$BRANCH_NAME" || $BRANCH_NAME =~ ^refs/pull/.* ]]; then if [[ -z "$BRANCH_NAME" || $BRANCH_NAME =~ ^refs/pull/.* ]]; then
continue continue
......
Prepare for rename of default complement branch.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment