Skip to content

Commit

Permalink
Merge branch 'master' into release/cherrypick-devchanges
Browse files Browse the repository at this point in the history
  • Loading branch information
bfops authored Aug 30, 2024
2 parents d9dedde + 32e43ca commit c827d0f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/check-pr-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Git tree checks

on:
pull_request:
types: [opened, edited, reopened, synchronize]
merge_group:
permissions: read-all

jobs:
check_base_ref:
name: Only release branches may merge into master
runs-on: ubuntu-latest
steps:
- id: not_based_on_master
if: |
github.event_name == 'pull_request' &&
github.event.pull_request.base.ref == 'master' &&
! startsWith(github.event.pull_request.head.ref, 'release/')
run: |
echo 'Only `release/*` branches are allowed to merge into `master`.'
echo 'Maybe your PR should be merging into `staging`?'
exit 1

0 comments on commit c827d0f

Please sign in to comment.