mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2024-11-22 12:49:02 +03:00
ci: added target branch checker for pull requests
This commit is contained in:
parent
cc808bf8df
commit
a1962a5267
1 changed files with 23 additions and 0 deletions
23
.github/workflows/target-branch.yml
vendored
Normal file
23
.github/workflows/target-branch.yml
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
name: Prevent PRs against `main`
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
# Please read https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ before using
|
||||
types: [opened, edited]
|
||||
|
||||
jobs:
|
||||
check-branch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Vankka/pr-target-branch-action@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
target: main
|
||||
exclude: next # Don't prevent going from next -> main
|
||||
change-to: next
|
||||
comment: |
|
||||
Your PR was set to target `main`, PRs should be target `next`.
|
||||
|
||||
The base branch of this PR has been automatically changed to `next`.
|
||||
Please verify that there are no merge conflicts.
|
Loading…
Reference in a new issue