Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI test that fails if a PR is issued to main #1356

Merged
merged 20 commits into from
Apr 5, 2024
Merged
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