Skip to content

Commit

Permalink
add check_pr_branch CI (#439)
Browse files Browse the repository at this point in the history
this ensures that PRs target development
  • Loading branch information
zingale authored Apr 11, 2024
1 parent 675571b commit 7ad0b03
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check_pr_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: check PR branch

on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited

jobs:
check-PR-branch:
runs-on: ubuntu-latest
steps:
- name: PRs should not target main
run: |
if [[ "${{ github.base_ref }}" == "main" ]]; then
echo 'Pull requests must not be made against main. Please target development instead.'
exit 1
fi

0 comments on commit 7ad0b03

Please sign in to comment.