mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 08:15:22 +03:00
[github workflow] auto-close PR's with branch named 'master' (#4071)
* [github workflow] auto-close PR's with branch named 'master' * [github workflow] auto-close PR's with branch named 'master'
This commit is contained in:
parent
5a3f06f890
commit
ee1ab8a830
1 changed files with 22 additions and 0 deletions
22
.github/workflows/auto-close.yml
vendored
Normal file
22
.github/workflows/auto-close.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
name: Auto close bad PR
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
close-pr:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Code Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: autoclose
|
||||
shell: bash
|
||||
if: github.head_ref == 'master'
|
||||
run: gh pr close ${{github.event.pull_request.number}} --comment "Auto-closing pull request because the source branch is named 'master'. Please create a feature branch instead. https://betaflight.com/docs/development#using-git-and-github"
|
Loading…
Add table
Add a link
Reference in a new issue