diff options
| -rw-r--r-- | .github/workflows/close-config-changes.yml | 19 | ||||
| -rw-r--r-- | .mergify.yml | 8 |
2 files changed, 19 insertions, 8 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 diff --git a/.mergify.yml b/.mergify.yml deleted file mode 100644 index a02fd15e..00000000 --- a/.mergify.yml +++ /dev/null @@ -1,8 +0,0 @@ -pull_request_rules: - - name: disallow changing a file - conditions: - - files=doc/server_configurations.md - actions: - close: - comment: - message: "server_configurations.md is auto-generated: edit the lua source file instead (and re-read the PR template)." |
