Skip to content

Commit f51f860

Browse files
authored
feat: team-label-token (#29)
* feat: team-label-token * Update add-team-label.yml * fix * Update add-team-label.yml * Update add-team-label-test.yml
1 parent 058012b commit f51f860

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/workflows/add-team-label-test.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@ on:
88
jobs:
99
add-team-label:
1010
uses: ./.github/workflows/add-team-label.yml
11-
permissions:
12-
pull-requests: write
1311
secrets:
14-
PERSONAL_ACCESS_TOKEN: ${{ secrets.LABEL_TOKEN }}
12+
TEAM_LABEL_TOKEN: ${{ secrets.TEAM_LABEL_TOKEN }}

.github/workflows/add-team-label.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Add team label
33
on:
44
workflow_call:
55
secrets:
6-
PERSONAL_ACCESS_TOKEN:
6+
TEAM_LABEL_TOKEN:
77
required: true
88

99
jobs:
@@ -13,7 +13,7 @@ jobs:
1313
- name: Get team label
1414
id: get-team-label
1515
env:
16-
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
16+
GH_TOKEN: ${{ secrets.TEAM_LABEL_TOKEN }}
1717
USER: ${{ github.event.pull_request.user.login }}
1818
run: |
1919
team_label=$(gh api -H 'Accept: application/vnd.github.raw' 'repos/metamask/metamask-planning/contents/teams.json' --jq ".\"$USER\"")
@@ -25,7 +25,7 @@ jobs:
2525
2626
- name: Add team label
2727
env:
28-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
GH_TOKEN: ${{ secrets.TEAM_LABEL_TOKEN }}
2929
PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }}
3030
TEAM_LABEL: ${{ steps.get-team-label.outputs.TEAM_LABEL }}
3131
run: |

0 commit comments

Comments
 (0)