File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 4
4
5
5
USER=$1
6
6
7
- response=$( gh api \
7
+ # Check membership for the sdk team
8
+ sdk_response=$( gh api \
8
9
-H " Accept: application/vnd.github+json" \
9
10
-H " X-GitHub-Api-Version: 2022-11-28" \
10
11
" /orgs/immutable/teams/sdk/memberships/${USER} " )
11
12
12
- echo " $response "
13
+ # Check membership for the passport team
14
+ passport_response=$( gh api \
15
+ -H " Accept: application/vnd.github+json" \
16
+ -H " X-GitHub-Api-Version: 2022-11-28" \
17
+ " /orgs/immutable/teams/passport/memberships/${USER} " )
13
18
14
- if echo " $response " | grep -q ' "state":"active"' ; then
19
+ echo " SDK Response: $sdk_response "
20
+ echo " Passport Response: $passport_response "
21
+
22
+ # Check if the user is a member of either team
23
+ if echo " $sdk_response " | grep -q ' "state":"active"' || echo " $passport_response " | grep -q ' "state":"active"' ; then
15
24
IS_MEMBER=true
16
25
else
17
26
IS_MEMBER=false
18
27
fi
28
+
19
29
echo " $IS_MEMBER "
20
30
21
31
# Set the environment variable for the GitHub workflow
22
- echo " IS_MEMBER=$IS_MEMBER " >> " $GITHUB_ENV "
32
+ echo " IS_MEMBER=$IS_MEMBER " >> " $GITHUB_ENV "
You can’t perform that action at this time.
0 commit comments