Skip to content

Commit

Permalink
fix: use cloud-java-bot username in new library generated PRs and com…
Browse files Browse the repository at this point in the history
…mits (#10266)

* fix: make cloud-java-bot the author of new library PR and commits

* use cloud java bot token when adding remote
  • Loading branch information
diegomarquezp committed Jan 22, 2024
1 parent 458516b commit 0e08104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/generate_new_client.yaml
Expand Up @@ -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
Expand All @@ -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}"
Expand Down

0 comments on commit 0e08104

Please sign in to comment.