@@ -27,13 +27,13 @@ jobs:
2727 with :
2828 fetch-depth : 1
2929 path : google-api-java-client-services
30- token : ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
30+ token : ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
3131 - uses : actions/checkout@v2
3232 with :
3333 repository : googleapis/discovery-artifact-manager
3434 fetch-depth : 1
3535 path : discovery-artifact-manager
36- token : ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
36+ token : ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
3737 - uses : actions/setup-python@v5
3838 with :
3939 python-version : 3.8.18
@@ -47,16 +47,19 @@ jobs:
4747 shell : bash
4848 working-directory : google-api-java-client-services
4949 env :
50- GH_TOKEN : ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
50+ GH_TOKEN : ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
5151 SERVICE : ${{ matrix.service }}
52- AUTHOR : " Cloud Java Bot <cloud-java -bot@google.com>"
52+ AUTHOR : " yoshi-code-bot <yoshi-code -bot@google.com>"
5353 BASE_REPO : " ${{ github.repository }}"
5454 run : |
5555 set -ex
5656
5757 # 1. Setup Identity
58- git config user.name "Cloud Java Bot"
59- git config user.email "cloud-java-bot@google.com"
58+ git config user.name "yoshi-code-bot"
59+ git config user.email "yoshi-code-bot@google.com"
60+
61+ # 2. Setup Remote Fork
62+ git remote add fork "https://yoshi-code-bot:${GH_TOKEN}@github.com/yoshi-code-bot/google-api-java-client-services.git"
6063
6164 # 3. Create Branch
6265 BRANCH="regenerate-${SERVICE}"
@@ -74,11 +77,11 @@ jobs:
7477 fi
7578
7679 git commit -m "$MESSAGE"
77- git push origin "$BRANCH" --force
80+ git push fork "$BRANCH" --force
7881
7982 gh pr create \
8083 --repo "$BASE_REPO" \
81- --head "${BRANCH}" \
84+ --head "yoshi-code-bot: ${BRANCH}" \
8285 --base "main" \
8386 --title "$MESSAGE" \
8487 --body "Generated in GitHub action: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
0 commit comments