File tree Expand file tree Collapse file tree 2 files changed +33
-5
lines changed Expand file tree Collapse file tree 2 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 33 issues :
44 types :
55 - opened, milestoned
6+
67permissions :
78 contents : read
89
1112 if : github.event.issue && github.event.issue.milestone
1213 runs-on : ubuntu-latest
1314 steps :
15+ - name : Get token
16+ id : get_token
17+ uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
18+ with :
19+ app_id : ${{ secrets.OBS_AUTOMATION_APP_ID }}
20+ private_key : ${{ secrets.OBS_AUTOMATION_APP_PEM }}
21+ permissions : >-
22+ {
23+ "organization_projects": "write",
24+ "issues": "read"
25+ }
26+
1427 - name : Get project data
1528 env :
16- GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
29+ GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
1730 TEAM : Java
1831 ORGANIZATION : elastic
1932 PROJECT_NUMBER : 595
4962
5063 - name : Add issue to project
5164 env :
52- GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
65+ GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
5366 ISSUE_ID : ${{ github.event.issue.node_id }}
5467 run : |
5568 item_id="$( gh api graphql -f query='
6578
6679 - name : Set fields
6780 env :
68- GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
81+ GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
6982 run : |
7083 gh api graphql -f query='
7184 mutation (
Original file line number Diff line number Diff line change @@ -24,12 +24,27 @@ jobs:
2424 repo: context.repo.repo,
2525 labels: ["agent-java"]
2626 })
27+
28+ - name : Get token
29+ id : get_token
30+ uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
31+ with :
32+ app_id : ${{ secrets.OBS_AUTOMATION_APP_ID }}
33+ private_key : ${{ secrets.OBS_AUTOMATION_APP_PEM }}
34+ permissions : >-
35+ {
36+ "members": "read",
37+ "organization_projects": "write",
38+ "issues": "read"
39+ }
40+
2741 - id : is_elastic_member
2842 uses : elastic/oblt-actions/github/is-member-of@v1
2943 with :
3044 github-org : " elastic"
3145 github-user : ${{ github.actor }}
32- github-token : ${{ secrets.APM_TECH_USER_TOKEN }}
46+ github-token : ${{ steps.get_token.outputs.token }}
47+
3348 - name : Add community and triage lables
3449 if : contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-renovate-prod[bot]'
3550 uses : actions/github-script@v7
5671 uses : elastic/assign-one-project-github-action@1.2.2
5772 if : contains(steps.is_elastic_member.outputs.result, 'true') && github.event.pull_request
5873 env :
59- MY_GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
74+ MY_GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
6075 with :
6176 project : ' https://github.com/orgs/elastic/projects/454'
6277 project_id : ' 5882982'
You can’t perform that action at this time.
0 commit comments