Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use CLOUD_JAVA_BOT_TOKEN in generate_new_client.yaml #10234

Merged
merged 4 commits into from
Jan 18, 2024

Conversation

diegomarquezp
Copy link
Contributor

@diegomarquezp diegomarquezp commented Jan 17, 2024

Some actions are failing in commands that require github authentication
#10179 (comment)

This includes generate_new_client.yaml. In this PR I try the Cloud Java Bot Github token to check whether this is a token expiration problem

Edit: see one of the resulting PRs: #10238

@diegomarquezp
Copy link
Contributor Author

diegomarquezp commented Jan 17, 2024

Currently investigating:

+ gh pr create --fill --head new-library/meet-qwvU5
could not compute title or body defaults: failed to run git: fatal: ambiguous argument 'origin/main...new-library/meet-qwvU5': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

From https://github.com/googleapis/google-cloud-java/actions/runs/7561708004/job/20590583313

edit: Can't reproduce locally - it probably depends on some gh environment setup. My gh pr create... produced #10235, which has wrong name and description

will try a different approach to generate PR name

@suztomo
Copy link
Member

suztomo commented Jan 17, 2024

It seems the problem is "--fill" option cli/cli#5896. If you explicitly specify title and body, it may work.

@diegomarquezp
Copy link
Contributor Author

diegomarquezp commented Jan 18, 2024

gh pr create --title 'feat: [meet] new module for meet' --body 'Generated with https://github.com/googleapis/google-cloud-java/actions/workflows/generate_new_client.yaml

Command used:

\```
python generation/new_client/new-client.py generate --api_shortname="meet" --proto-path="google/apps/meet" --name-pretty="Google Meet API" --product-docs="https://developers.google.com/meet/api/guides/overview" --api-description="The Google Meet REST API lets you create and manage meetings for Google Meet and offers entry points to your users directly from your app" --transport="grpc"
\```' --head new-library/meet-jcOi0
pull request create failed: GraphQL: must be a collaborator (createPullRequest)

I thought Cloud Java Bot was a collaborator, I'll check on that. We can always use ${{ github.token }} though

edit: I added it as collaborator and I could create #10237, but I'll try ${{ github.token }} to see if we can modify the author shown in the PR description

edit 2: So the author of the PR can't be set by design. I modified the PR body message to mention the author and set the token back to CLOUD_JAVA_BOT_TOKEN

@diegomarquezp
Copy link
Contributor Author

diegomarquezp commented Jan 18, 2024

#10238 generated by the latest run - looks OK

@diegomarquezp diegomarquezp marked this pull request as ready for review January 18, 2024 15:23
@diegomarquezp diegomarquezp requested a review from a team as a code owner January 18, 2024 15:23
@suztomo suztomo added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 18, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 18, 2024
@diegomarquezp diegomarquezp changed the title Use CLOUD_JAVA_BOT_TOKEN in generate_new_client.yaml chore: use CLOUD_JAVA_BOT_TOKEN in generate_new_client.yaml Jan 18, 2024
@diegomarquezp diegomarquezp merged commit 1035c76 into main Jan 18, 2024
34 checks passed
@diegomarquezp diegomarquezp deleted the diegomarquezp-patch-1 branch January 18, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants