From 810d171bf586e14f704057342e1644a4f521a1c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 7 Oct 2020 09:33:05 +0200 Subject: [PATCH] Automation: Adds github automation commands, and base architecture to build more automation on (#28072) * Automation: Adds github automation commands, and base architecture to build more automation on * Updated commmand * updated commands * Updated token name --- .github/commands.json | 21 +++++++++++++++++++++ .github/workflows/commands.yml | 24 ++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/commands.json create mode 100644 .github/workflows/commands.yml 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