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
This commit is contained in:
Torkel Ödegaard 2020-10-07 09:33:05 +02:00 committed by GitHub
parent 9cd3ab0340
commit 810d171bf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

21
.github/commands.json vendored Normal file
View File

@ -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!"
}
]

24
.github/workflows/commands.yml vendored Normal file
View File

@ -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