Skip to content

Commit ee3826b

Browse files
committed
Update check-branch.yml
1 parent ce4b101 commit ee3826b

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

‎.github/workflows/check-branch.yml‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ jobs:
77
check_branch:
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Comment PR
11-
if: github.base_ref == 'master' && github.head_ref != 'staging'
12-
uses: thollander/actions-comment-pull-request@v2
13-
with:
14-
message: |
15-
We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the staging branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch.
16-
- name: Check branch
17-
if: github.base_ref == 'master' && github.head_ref != 'staging'
10+
# PRs into master are no longer blocked here based on their source branch.
11+
# Direct merges into master (i.e. without going through PR review) are expected
12+
# to be prevented by GitHub branch protection rules on master, not by this CI check.
13+
- name: Branch check (informational only)
1814
run: |
19-
echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the staging branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch."
20-
exit 1
15+
echo "This workflow no longer restricts which branch a PR into master can come from."
16+
echo "Base branch : ${{ github.base_ref }}"
17+
echo "Head branch : ${{ github.head_ref }}"
18+
echo "Direct pushes/merges to master should be prevented via branch protection rules, not this workflow."

0 commit comments

Comments
 (0)