diff --git a/.github/workflows/generate_new_client.yaml b/.github/workflows/generate_new_client.yaml index 422a3b6c8993..d263b7b5a90e 100644 --- a/.github/workflows/generate_new_client.yaml +++ b/.github/workflows/generate_new_client.yaml @@ -100,7 +100,7 @@ jobs: echo "::set-output name=new_library_args::${arguments}" echo "${arguments} --googleapis-gen-url=\"${GOOGLEAPIS_GEN_URL}\"" | xargs python generation/new_client/new-client.py generate env: - GOOGLEAPIS_GEN_URL: https://yoshi-approver:${{ secrets.YOSHI_CODE_BOT_TOKEN }}@github.com/googleapis/googleapis-gen.git + GOOGLEAPIS_GEN_URL: https://cloud-java-bot:${{ secrets.CLOUD_JAVA_BOT_TOKEN }}@github.com/googleapis/googleapis-gen.git API_SHORTNAME: ${{ github.event.inputs.api_shortname }} NAME_PRETTY: ${{ github.event.inputs.name_pretty }} PROTO_PATH: ${{ github.event.inputs.proto_path }} @@ -123,25 +123,24 @@ jobs: branch_name="new-library/${{ github.event.inputs.api_shortname }}-${random_id}" git checkout -b "${branch_name}" git add --all - git commit -m "feat: [${API_SHORTNAME}] new module for ${API_SHORTNAME} - + 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 fetch -q --unshallow monorepo + git push -f monorepo "${branch_name}" - Generated with https://github.com/googleapis/google-cloud-java/actions/workflows/generate_new_client.yaml + # create PR + pr_body="Generated by @${USERNAME} via [generate_new_client.yaml](https://github.com/googleapis/google-cloud-java/actions/workflows/generate_new_client.yaml) Command used: \`\`\` python generation/new_client/new-client.py generate ${GENERATION_ARGUMENTS} \`\`\`" - git remote add monorepo https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.git - git fetch -q --unshallow monorepo - git push -f monorepo "${branch_name}" - - # create PR - gh pr create --fill --head "${branch_name}" + gh pr create --title "${commit_message}" --label "owlbot:run" --head "${branch_name}" --body "${pr_body}" env: USERNAME: ${{ github.actor }} API_SHORTNAME: ${{ github.event.inputs.api_shortname }} GENERATION_ARGUMENTS: ${{ steps.generation.outputs.new_library_args }} - GH_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}