diff --git a/.github/commands.json b/.github/commands.json new file mode 100644 index 00000000000..7239ef4f558 --- /dev/null +++ b/.github/commands.json @@ -0,0 +1,21 @@ +[ + { + "type": "label", + "name": "type/question", + "action": "close", + "comment": "Please ask your question on [community.grafana.com/](https://community.grafana.com/. See also our [issue reporting](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md#report-bugs) guidelines.\n\nHappy Coding!" + }, + { + "type": "comment", + "name": "duplicate", + "allowUsers": [], + "action": "updateLabels", + "addLabel": "type/duplicate" + }, + { + "type": "label", + "name": "type/duplicate", + "action": "close", + "comment": "Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. See also our [issue reporting](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md#report-bugs) guidelines.\n\nHappy Coding!" + } +] diff --git a/.github/workflows/commands.yml b/.github/workflows/commands.yml new file mode 100644 index 00000000000..c4fe9e7cfc8 --- /dev/null +++ b/.github/workflows/commands.yml @@ -0,0 +1,24 @@ +name: Run commands when issues are labeled or comments added +on: + issues: + types: [labeled] + issue_comment: + types: [created] + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Checkout Actions + uses: actions/checkout@v2 + with: + repository: "grafana/grafana-github-actions" + path: ./actions + ref: main + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Run Commands + uses: ./actions/commands + with: + token: ${{secrets.GH_BOT_ACCESS_TOKEN} + config-path: commands