Skip to content

Commit

Permalink
Add CI test that fails if a PR is issued to main
Browse files Browse the repository at this point in the history
  • Loading branch information
yut23 committed Apr 5, 2024
1 parent 0462ceb commit dbe7bf4
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 dbe7bf4

Please sign in to comment.