Skip to content

Commit

Permalink
Prevent pull request to main
Browse files Browse the repository at this point in the history
Signed-off-by: Tharun Kumar Merugu <[email protected]>
  • Loading branch information
quic-mtharu committed Aug 8, 2024
1 parent 75678a8 commit 64c1aeb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pull_request_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Prevent pull request to main
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- edited

jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
if [ ${{ github.head_ref }} != "development" ] && [ ${{ github.base_ref }} == "main" ]; then
echo "Create a pull request to quic/development branch"
echo "Pull requests to main branch are only allowed from quic/development branch."
exit 1
fi

0 comments on commit 64c1aeb

Please sign in to comment.