2727 with :
2828 fetch-depth : 1
2929 path : google-api-java-client-services
30+ token : ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
3031 - uses : actions/checkout@v2
3132 with :
3233 repository : googleapis/discovery-artifact-manager
@@ -45,20 +46,16 @@ jobs:
4546 shell : bash
4647 working-directory : google-api-java-client-services
4748 env :
48- GH_TOKEN : ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
49+ GH_TOKEN : ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
4950 SERVICE : ${{ matrix.service }}
50- AUTHOR : " Yoshi Code Bot <yoshi-automation@google.com>"
51- FORK_REPO : " yoshi-code-bot/google-api-java-client-services"
51+ AUTHOR : " Cloud Java Bot <cloud-java-bot@google.com>"
5252 BASE_REPO : " ${{ github.repository }}"
5353 run : |
5454 set -ex
5555
5656 # 1. Setup Identity
57- git config user.name "Yoshi Code Bot"
58- git config user.email "yoshi-automation@google.com"
59-
60- # 2. Add and Fetch Fork
61- git remote add fork "https://x-access-token:${GH_TOKEN}@github.com/${FORK_REPO}.git"
57+ git config user.name "Cloud Java Bot"
58+ git config user.email "cloud-java-bot@google.com"
6259
6360 # 3. Create Branch
6461 BRANCH="regenerate-${SERVICE}"
@@ -76,15 +73,11 @@ jobs:
7673 fi
7774
7875 git commit -m "$MESSAGE"
79- git push fork "$BRANCH" --force
80-
81- # 6. Create PR using GitHub CLI
82- # Note: --head needs 'owner:branch' format when pushing from a fork
83- FORK_OWNER=$(echo "$FORK_REPO" | cut -d'/' -f1)
76+ git push origin "$BRANCH" --force
8477
8578 gh pr create \
8679 --repo "$BASE_REPO" \
87- --head "${FORK_OWNER}:${ BRANCH}" \
80+ --head "${BRANCH}" \
8881 --base "main" \
8982 --title "$MESSAGE" \
9083 --body "Generated in GitHub action: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
0 commit comments