5454 exit 1
5555 fi
5656
57- ## echo "Creating new repository: https://github.com/$OWNER/$REPO_NAME"
58- ## gh repo create "$OWNER/$REPO_NAME" --public --template "$OWNER/$(basename '${{ github.repository }}')" --confirm
57+ echo "Creating new repository: https://github.com/$OWNER/$REPO_NAME"
58+ gh repo create "$OWNER/$REPO_NAME" --public --template "$OWNER/$(basename '${{ github.repository }}')" --confirm
5959
6060 echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
6161 echo "OWNER=$OWNER" >> $GITHUB_ENV
@@ -68,14 +68,13 @@ jobs:
6868 if gh api orgs/$OWNER/teams > /dev/null 2>&1; then
6969 if ! gh api orgs/$OWNER/teams/$MAINTAINERS_TEAM > /dev/null 2>&1; then
7070 MAINTAINERS_PARENT_ID=$(gh api orgs/$OWNER/teams/maintainers | jq -r '.id')
71- echo "Debug: MAINTAINERS_PARENT_ID=$MAINTAINERS_PARENT_ID "
7271 MAINTAINERS_PARENT_ID_NUM=$(echo "$MAINTAINERS_PARENT_ID" | grep -o '[0-9]*')
73- echo "Debug: MAINTAINERS_PARENT_ID_NUM=$MAINTAINERS_PARENT_ID_NUM "
72+ echo "Debug: MAINTAINERS_PARENT_ID_NUM=$MAINTAINERS_PARENT_ID_NUM"
7473 if [ -z "$MAINTAINERS_PARENT_ID_NUM" ]; then
7574 echo "::error::Invalid team ID format for maintainers. Expected numeric ID."
7675 exit 1
7776 fi
78- echo "{\"name\": \"$MAINTAINERS_TEAM\", \"parent_team_id\": $MAINTAINERS_PARENT_ID_NUM}" > maintainer_payload.json
77+ echo "{\"name\": \"$MAINTAINERS_TEAM\", \"description\": \"Maintainers for $REPO_NAME\ repository", \" parent_team_id\": $MAINTAINERS_PARENT_ID_NUM}" > maintainer_payload.json
7978 gh api orgs/$OWNER/teams \
8079 -X POST \
8180 -H "Accept: application/vnd.github+json" \
@@ -87,11 +86,12 @@ jobs:
8786 if ! gh api orgs/$OWNER/teams/$CODEOWNERS_TEAM > /dev/null 2>&1; then
8887 CODEOWNERS_PARENT_ID=$(gh api orgs/$OWNER/teams/codeowners | jq -r '.id')
8988 CODEOWNERS_PARENT_ID_NUM=$(echo "$CODEOWNERS_PARENT_ID" | grep -o '[0-9]*')
89+ echo "Debug: CODEOWNERS_PARENT_ID_NUM=$CODEOWNERS_PARENT_ID_NUM"
9090 if [ -z "$CODEOWNERS_PARENT_ID_NUM" ]; then
9191 echo "::error::Invalid team ID format for codeowners. Expected numeric ID."
9292 exit 1
9393 fi
94- echo "{\"name\": \"$CODEOWNERS_TEAM\", \"parent_team_id\": $CODEOWNERS_PARENT_ID_NUM}" > codeowners_payload.json
94+ echo "{\"name\": \"$CODEOWNERS_TEAM\", \"description\": \"Codeowners for $REPO_NAME\ repository", \" parent_team_id\": $CODEOWNERS_PARENT_ID_NUM}" > codeowners_payload.json
9595 gh api orgs/$OWNER/teams \
9696 -X POST \
9797 -H "Accept: application/vnd.github+json" \
0 commit comments