Skip to content

Ensure pull requests against main #222

Ensure pull requests against main

Ensure pull requests against main #222

name: Ensure pull requests against main
on:
pull_request_target: # Please read https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ before using
types: [opened, edited]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Ensure Target Branch is valid
uses: Vankka/pr-target-branch-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# The target branch
target: live
# A list (space separated string) of base branches which are allowed to PR the given target (cannot be used with include)
exclude: main
# The branch the PR's target should be changed to if the target is incorrect
change-to: main
comment: |
All pull requests needs to be targeted to main for validation.
Please open pull requests against `main` in the future.
already-exists-action: nothing