From 0e08104eb54d10c02e420a7f4fae452af3b87f61 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Mon, 22 Jan 2024 14:33:58 -0500 Subject: [PATCH] fix: use cloud-java-bot username in new library generated PRs and commits (#10266) * fix: make cloud-java-bot the author of new library PR and commits * use cloud java bot token when adding remote --- .github/workflows/generate_new_client.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_new_client.yaml b/.github/workflows/generate_new_client.yaml index d263b7b5a90e..b7a359bff757 100644 --- a/.github/workflows/generate_new_client.yaml +++ b/.github/workflows/generate_new_client.yaml @@ -114,8 +114,8 @@ jobs: - name: Push to branch and create PR run: | set -x - [ -z "`git config user.email`" ] && git config --global user.email "${USERNAME:-script}@google.com" - [ -z "`git config user.name`" ] && git config --global user.name "${USERNAME:-script}" + [ -z "`git config user.email`" ] && git config --global user.email "cloud-java-bot@google.com" + [ -z "`git config user.name`" ] && git config --global user.name "cloud-java-bot" # create and push to branch in origin # random_id allows multiple runs of this workflow @@ -125,7 +125,7 @@ jobs: git add --all commit_message="feat: [${API_SHORTNAME}] new module for ${API_SHORTNAME}" git commit -m "${commit_message}" - git remote add monorepo https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.git + git remote add monorepo https://cloud-java-bot:${GH_TOKEN}@github.com/${{ github.repository }}.git git fetch -q --unshallow monorepo git push -f monorepo "${branch_name}"