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

feat(internal/postprocessor): make OwlBot postprocessor #7202

Merged
merged 81 commits into from
Jan 9, 2023

Conversation

adrianajg
Copy link
Contributor

@adrianajg adrianajg commented Jan 3, 2023

OwlBot will be configured to copy generated files directly into their corresponding client directories. When triggered by the OwlBot automation robot, the postprocessor performs the following tasks:

  • run $ go mod tidy in all repo directories
  • run $ gofmt -s -d -w -l . in all repo directories
  • regenerate snippets for all clients
  • write manifest file with info about all gapic configurations
  • update pull request title and description, amending commit titles to match Conventional Commit format
    • The amended PR title and description are written to a file in a well-known-location, which OwlBot uses to amend the open PR
    • The .github.OwlBot.yaml file must include an api-name field with the value REPLACEME in order to label all commit messages with the placeholder scope '[REPLACEME]'.

adrianajg and others added 30 commits October 20, 2022 10:10
feat(postprocessor): integrate OwlBot locally and add basic post-processor to copy generated code into libraries
…utput directory for snippets to go into local repo internal/generated/snippets
…ient and lints that same client, skips all others
refactor(internal): Move gensnippets files to internal
…ig.go. Move cloning of google-cloud-go to main()
@product-auto-label product-auto-label bot added the size: xl Pull request size is extra large. label Jan 3, 2023
@adrianajg adrianajg marked this pull request as ready for review January 3, 2023 23:03
@adrianajg adrianajg requested a review from a team as a code owner January 3, 2023 23:03
@snippet-bot
Copy link

snippet-bot bot commented Jan 3, 2023

Here is the summary of possible violations 😱

There is a possible violation for not having product prefix.
There is a format violation for a region tag.

The end of the violation section. All the stuff below is FYI purposes only.


Here is the summary of changes.

You are about to add 1 region tag.
You are about to delete 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small nits and the PR needs to be updated and resolve a merge conflict.

internal/postprocessor/main.go Outdated Show resolved Hide resolved
internal/postprocessor/main_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@noahdietz noahdietz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff @adrianajg ! If any of my comments refer to code that was strictly moved directories, feel free to ignore them. They are all style nits anyways :)

internal/gensnippets/gensnippets.go Outdated Show resolved Hide resolved
internal/postprocessor/README.md Outdated Show resolved Hide resolved
internal/postprocessor/README.md Outdated Show resolved Hide resolved
internal/postprocessor/execv/command.go Outdated Show resolved Hide resolved
internal/postprocessor/execv/gocmd/gocmd.go Outdated Show resolved Hide resolved
internal/postprocessor/execv/gocmd/gocmd.go Outdated Show resolved Hide resolved
Copy link
Contributor Author

@adrianajg adrianajg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! I addressed your comments, sometimes with additional tweaks. I also updated the README.md as I noticed there was some outdated info there. Let me know if you see anything else.

internal/gensnippets/gensnippets.go Outdated Show resolved Hide resolved
internal/postprocessor/README.md Outdated Show resolved Hide resolved
internal/postprocessor/README.md Outdated Show resolved Hide resolved
internal/postprocessor/execv/command.go Outdated Show resolved Hide resolved
internal/postprocessor/execv/gocmd/gocmd.go Outdated Show resolved Hide resolved
internal/postprocessor/execv/gocmd/gocmd.go Outdated Show resolved Hide resolved
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@codyoss codyoss merged commit 7a1022e into googleapis:main Jan 9, 2023
@codyoss codyoss deleted the Postprocessor branch January 9, 2023 21:46
@quartzmo
Copy link
Member

quartzmo commented Jan 9, 2023

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants