File tree 2 files changed +26
-4
lines changed
2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 11
11
if : github.event.issue && github.event.issue.milestone
12
12
runs-on : ubuntu-latest
13
13
steps :
14
+ - name : Get token
15
+ id : get_token
16
+ uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
17
+ with :
18
+ app_id : ${{ secrets.OBS_AUTOMATION_APP_ID }}
19
+ private_key : ${{ secrets.OBS_AUTOMATION_APP_PEM }}
20
+ permissions : >-
21
+ {
22
+ "organization_projects": "write",
23
+ "issues": "read"
24
+ }
14
25
- name : Get project data
15
26
env :
16
- GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
27
+ GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
17
28
TEAM : Node.js
18
29
ORGANIZATION : elastic
19
30
PROJECT_NUMBER : 595
49
60
50
61
- name : Add issue to project
51
62
env :
52
- GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
63
+ GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
53
64
ISSUE_ID : ${{ github.event.issue.node_id }}
54
65
run : |
55
66
item_id="$( gh api graphql -f query='
65
76
66
77
- name : Set fields
67
78
env :
68
- GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
79
+ GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
69
80
run : |
70
81
gh api graphql -f query='
71
82
mutation (
Original file line number Diff line number Diff line change @@ -15,12 +15,23 @@ jobs:
15
15
triage :
16
16
runs-on : ubuntu-latest
17
17
steps :
18
+ - name : Get token
19
+ id : get_token
20
+ uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
21
+ with :
22
+ app_id : ${{ secrets.OBS_AUTOMATION_APP_ID }}
23
+ private_key : ${{ secrets.OBS_AUTOMATION_APP_PEM }}
24
+ permissions : >-
25
+ {
26
+ "members": "read"
27
+ }
28
+
18
29
- id : is_elastic_member
19
30
uses : elastic/oblt-actions/github/is-member-of@v1
20
31
with :
21
32
github-org : " elastic"
22
33
github-user : ${{ github.actor }}
23
- github-token : ${{ secrets.APM_TECH_USER_TOKEN }}
34
+ github-token : ${{ steps.get_token.outputs.token }}
24
35
25
36
- name : Add community and triage labels
26
37
if : contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]'
You can’t perform that action at this time.
0 commit comments