Skip to content

Commit b832feb

Browse files
authored
Update setup-new-repo.yml
1 parent 1b8e581 commit b832feb

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/setup-new-repo.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ jobs:
7575
echo "::error::Invalid team ID format for maintainers. Expected numeric ID."
7676
exit 1
7777
fi
78-
gh api orgs/$OWNER/teams -f name="$MAINTAINERS_TEAM" -f parent_team_id=$MAINTAINERS_PARENT_ID_NUM
78+
echo "{\"name\": \"$MAINTAINERS_TEAM\", \"parent_team_id\": $MAINTAINERS_PARENT_ID_NUM}" > maintainer_payload.json
79+
gh api orgs/$OWNER/teams \
80+
-X POST \
81+
-H "Accept: application/vnd.github+json" \
82+
--input maintainer_payload.json
7983
else
8084
echo "Team $MAINTAINERS_TEAM already exists. Skipping creation."
8185
fi
@@ -87,7 +91,11 @@ jobs:
8791
echo "::error::Invalid team ID format for codeowners. Expected numeric ID."
8892
exit 1
8993
fi
90-
gh api orgs/$OWNER/teams -f name="$CODEOWNERS_TEAM" -f parent_team_id=$CODEOWNERS_PARENT_ID_NUM
94+
echo "{\"name\": \"$CODEOWNERS_TEAM\", \"parent_team_id\": $CODEOWNERS_PARENT_ID_NUM}" > codeowners_payload.json
95+
gh api orgs/$OWNER/teams \
96+
-X POST \
97+
-H "Accept: application/vnd.github+json" \
98+
--input codeowners_payload.json
9199
else
92100
echo "Team $CODEOWNERS_TEAM already exists. Skipping creation."
93101
fi

0 commit comments

Comments
 (0)