Skip to content

Commit

Permalink
Make release
Browse files Browse the repository at this point in the history
  • Loading branch information
ivvist committed May 5, 2024
1 parent 747f564 commit 5dfd467
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/wf-sp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
echo "team1: $TEAM_NAME"
echo "user1: $USER_NAME"
# Check organization membership
ORG_MEMBERSHIP=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${{ secrets.REPOREADING_TOKEN }}" "https://api.github.com/orgs/$ORG_NAME/members/$USER_NAME")
ORG_MEMBERSHIP=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${{ secrets.PERSONAL_TOKEN }}" "https://api.github.com/orgs/$ORG_NAME/members/$USER_NAME")

if [[ $ORG_MEMBERSHIP -ne 404 ]]; then
echo "The user $USER_NAME is a member of the organization $ORG_NAME."
Expand All @@ -57,7 +57,7 @@ jobs:
fi

# Check team membership
TEAM_MEMBERSHIP=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${{ secrets.REPOREADING_TOKEN }}" "https://api.github.com/orgs/$ORG_NAME/teams/$TEAM_NAME/memberships/$USER_NAME")
TEAM_MEMBERSHIP=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${{ secrets.PERSONAL_TOKEN }}" "https://api.github.com/orgs/$ORG_NAME/teams/$TEAM_NAME/memberships/$USER_NAME")

if [[ $TEAM_MEMBERSHIP -eq 200 ]]; then
echo "The user $USER_NAME is a member of the team $TEAM_NAME within the organization $ORG_NAME."
Expand Down

0 comments on commit 5dfd467

Please sign in to comment.