Skip to content

Restrict Branch Merge and Automatically Add PR labels to Pull Requests #2

Restrict Branch Merge and Automatically Add PR labels to Pull Requests

Restrict Branch Merge and Automatically Add PR labels to Pull Requests #2

Workflow file for this run

name: "Enforce Release or Hotfix Branch Merge"
on:
pull_request:
branches:
- main
jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Check if PR is from the release or hotfix branch
if: github.head_ref != 'release' && github.head_ref != 'hotfix'
run: |
echo "Only the release or hotfix branch can be merged into main."
exit 1