File tree Expand file tree Collapse file tree 2 files changed +31
-5
lines changed Expand file tree Collapse file tree 2 files changed +31
-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+ "repository_projects": "write"
24+ }
25+
1426 - name : Get project data
1527 env :
16- GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
28+ GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
1729 TEAM : Java
1830 ORGANIZATION : elastic
1931 PROJECT_NUMBER : 595
4961
5062 - name : Add issue to project
5163 env :
52- GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
64+ GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
5365 ISSUE_ID : ${{ github.event.issue.node_id }}
5466 run : |
5567 item_id="$( gh api graphql -f query='
6577
6678 - name : Set fields
6779 env :
68- GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
80+ GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
6981 run : |
7082 gh api graphql -f query='
7183 mutation (
Original file line number Diff line number Diff line change @@ -24,12 +24,26 @@ 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+ "repository_projects": "write"
38+ }
39+
2740 - id : is_elastic_member
2841 uses : elastic/oblt-actions/github/is-member-of@v1
2942 with :
3043 github-org : " elastic"
3144 github-user : ${{ github.actor }}
32- github-token : ${{ secrets.APM_TECH_USER_TOKEN }}
45+ github-token : ${{ steps.get_token.outputs.token }}
46+
3347 - name : Add community and triage lables
3448 if : contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-renovate-prod[bot]'
3549 uses : actions/github-script@v7
5670 uses : elastic/assign-one-project-github-action@1.2.2
5771 if : contains(steps.is_elastic_member.outputs.result, 'true') && github.event.pull_request
5872 env :
59- MY_GITHUB_TOKEN : ${{ secrets.APM_TECH_USER_TOKEN }}
73+ MY_GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
6074 with :
6175 project : ' https://github.com/orgs/elastic/projects/454'
6276 project_id : ' 5882982'
You can’t perform that action at this time.
0 commit comments