diff options
| author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-11-11 10:03:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-11 01:03:35 -0800 |
| commit | 54fdd63d7f9b52f2c72a2845e17c8a56c9849d14 (patch) | |
| tree | 89d8f01626a93d92846cd73e93d36ea2ae2fc545 /.github | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-54fdd63d7f9b52f2c72a2845e17c8a56c9849d14.tar nvim-lspconfig-54fdd63d7f9b52f2c72a2845e17c8a56c9849d14.tar.gz nvim-lspconfig-54fdd63d7f9b52f2c72a2845e17c8a56c9849d14.tar.bz2 nvim-lspconfig-54fdd63d7f9b52f2c72a2845e17c8a56c9849d14.tar.lz nvim-lspconfig-54fdd63d7f9b52f2c72a2845e17c8a56c9849d14.tar.xz nvim-lspconfig-54fdd63d7f9b52f2c72a2845e17c8a56c9849d14.tar.zst nvim-lspconfig-54fdd63d7f9b52f2c72a2845e17c8a56c9849d14.zip | |
ci: automatically close pull requests that modify server_configurations.md (#1400)
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/close-config-changes.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.github/workflows/close-config-changes.yml b/.github/workflows/close-config-changes.yml new file mode 100644 index 00000000..10731c4b --- /dev/null +++ b/.github/workflows/close-config-changes.yml @@ -0,0 +1,19 @@ +name: "Close changes to config" +on: [pull_request] +jobs: + close-changes: + runs-on: ubuntu-latest + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2.3.1 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + - run: | + if ! git diff origin/$GITHUB_BASE_REF...$(git branch --show-current) --exit-code -- doc/server_configurations.md; then + gh pr close $PR_NUMBER + gh pr comment $PR_NUMBER --body "This pull request has been automatically closed. Changes to server_configurations.md aren't allowed - edit the lua source file instead. Consult https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md#generating-docs." + exit 1 + fi |
