File tree 2 files changed +31
-12
lines changed
2 files changed +31
-12
lines changed Original file line number Diff line number Diff line change
1
+ name : Add team label test
2
+
3
+ on : push
4
+
5
+ jobs :
6
+ add-team-label :
7
+ uses : ./.github/workflows/add-team-label.yml
Original file line number Diff line number Diff line change @@ -2,21 +2,33 @@ name: Add team label
2
2
3
3
on :
4
4
workflow_call :
5
- secrets :
6
- PERSONAL_ACCESS_TOKEN :
7
- required : true
8
5
9
6
jobs :
10
7
add-team-label :
11
8
runs-on : ubuntu-latest
12
9
steps :
13
- - name : Checkout repository
14
- uses : actions/checkout@v4
15
-
16
- - name : Setup environment
17
- uses : metamask/github-tools/.github/actions/setup-environment@main
18
-
19
- - name : Add team label
10
+ - name : Get teams
11
+ id : teams
12
+
20
13
env :
21
- PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
22
- run : yarn run add-team-label
14
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
15
+ with :
16
+ query : |
17
+ query teams($organization:String!,$user:String!) {
18
+ organization(login: $organization) {
19
+ teams(first: 100, userLogins: [$user]) {
20
+ edges {
21
+ node {
22
+ name
23
+ description
24
+ slug
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
30
+ variables : |
31
+ organization: ${{ github.event.repository.owner.name }}
32
+ user: ${{ github.event.pull_request.user.login }}
33
+
34
+ - run : " echo '${{ steps.teams.outputs.data }}'"
You can’t perform that action at this time.
0 commit comments