Skip to content

Commit 64a40b6

Browse files
authored
Chore: add label to external contributions (#340)
1 parent ee010a7 commit 64a40b6

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/pr-commands.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[
2+
{
3+
"type": "author",
4+
"name": "pr/external",
5+
"notMemberOf": {
6+
"org": "grafana"
7+
},
8+
"ignoreList": ["renovate[bot]", "dependabot[bot]", "grafana-delivery-bot[bot]", "grafanabot"],
9+
"action": "updateLabel",
10+
"addLabel": "pr/external"
11+
},
12+
{
13+
"type": "label",
14+
"name": "pr/external",
15+
"action": "addToProject",
16+
"addToProject": {
17+
"url": "https://github.com/orgs/grafana/projects/97",
18+
"column": "Incoming"
19+
}
20+
}
21+
]

.github/workflows/pr-commands.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: PR automation
2+
on:
3+
pull_request_target:
4+
types:
5+
- labeled
6+
- opened
7+
concurrency:
8+
group: pr-commands-${{ github.event.number }}
9+
jobs:
10+
main:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Actions
14+
uses: actions/checkout@v4
15+
with:
16+
repository: 'grafana/grafana-github-actions'
17+
path: ./actions
18+
ref: main
19+
- name: Install Actions
20+
run: npm install --production --prefix ./actions
21+
- name: 'Generate token'
22+
id: generate_token
23+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
24+
with:
25+
app_id: ${{ secrets.AWS_DS_TOKEN_CREATOR_ID }}
26+
private_key: ${{ secrets.AWS_DS_TOKEN_CREATOR_PEM }}
27+
- name: Run Commands
28+
uses: ./actions/commands
29+
with:
30+
token: ${{ steps.generate_token.outputs.token }}
31+
configPath: pr-commands

0 commit comments

Comments
 (0)