1
0
Fork 0
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:
nerdCopter 2024-06-28 14:43:32 -05:00 committed by GitHub
parent 5a3f06f890
commit ee1ab8a830
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

22
.github/workflows/auto-close.yml vendored Normal file
View 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"