diff options
| author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-11-21 14:52:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-21 08:52:48 -0500 |
| commit | 25deac73972fa46ddc9c8caff3a1f55c4bde3556 (patch) | |
| tree | 5d196228958f841a6b2a887ac704b7c7fac1d443 /.github | |
| parent | fix(health): fix problem that could return empty results (#1461) (diff) | |
| download | nvim-lspconfig-25deac73972fa46ddc9c8caff3a1f55c4bde3556.tar nvim-lspconfig-25deac73972fa46ddc9c8caff3a1f55c4bde3556.tar.gz nvim-lspconfig-25deac73972fa46ddc9c8caff3a1f55c4bde3556.tar.bz2 nvim-lspconfig-25deac73972fa46ddc9c8caff3a1f55c4bde3556.tar.lz nvim-lspconfig-25deac73972fa46ddc9c8caff3a1f55c4bde3556.tar.xz nvim-lspconfig-25deac73972fa46ddc9c8caff3a1f55c4bde3556.tar.zst nvim-lspconfig-25deac73972fa46ddc9c8caff3a1f55c4bde3556.zip | |
ci: close PRs not filed from feature branches (#1464)
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/feature-branch-check.yml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/feature-branch-check.yml b/.github/workflows/feature-branch-check.yml new file mode 100644 index 00000000..7e5b4601 --- /dev/null +++ b/.github/workflows/feature-branch-check.yml @@ -0,0 +1,28 @@ +name: Close Non-Feature Branches + +on: + pull_request_target: + branches: + - master + +jobs: + close-master-branch: + runs-on: ubuntu-latest + permissions: + pull-requests: write + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Close if master branch + if: ${{ github.head_ref == 'master' }} + run: | + gh pr close $PR_NUMBER + gh pr comment $PR_NUMBER --body "This pull request has been automatically closed. Please develop on a feature branch. Thank you." + exit 1 |
