File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ check_command mvn
1919# Configuration
2020MONOREPO_URL=" https://github.com/googleapis/google-cloud-java"
2121SOURCE_REPO_URL=" ${SOURCE_REPO_URL:- https:// github.com/ googleapis/ java-logging} "
22+ CODEOWNER=" ${CODEOWNER:- } "
2223
2324# Derive names from URLs to avoid duplication
2425SOURCE_REPO_NAME=" ${SOURCE_REPO_URL##*/ } "
@@ -116,6 +117,17 @@ git read-tree --prefix="$SOURCE_REPO_NAME/" -u "$SOURCE_REPO_NAME/main"
116117echo " Committing migration..."
117118git commit -n --no-gpg-sign -m " chore($SOURCE_REPO_NAME ): migrate $SOURCE_REPO_NAME into monorepo"
118119
120+ # 7.1 Update CODEOWNERS
121+ if [ -n " $CODEOWNER " ]; then
122+ echo " Updating .github/CODEOWNERS..."
123+ mkdir -p .github
124+ echo " /$SOURCE_REPO_NAME / $CODEOWNER @googleapis/cloud-java-team-teamsync" >> .github/CODEOWNERS
125+
126+ echo " Committing CODEOWNERS update..."
127+ git add .github/CODEOWNERS
128+ git commit -n --no-gpg-sign -m " chore($SOURCE_REPO_NAME ): add code owners for $SOURCE_REPO_NAME "
129+ fi
130+
119131# 7.5 Migrate GitHub Actions workflows
120132echo " Checking for GitHub Actions workflows..."
121133if [ -d " $SOURCE_REPO_NAME /.github/workflows" ]; then
You can’t perform that action at this time.
0 commit comments