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

fix: make workspace plugin with separate-pull-request fine #2310

Merged

Conversation

Hajime-san
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1858 🦕

If the documentation needs updating, please let me know.

@Hajime-san Hajime-san requested review from a team as code owners June 12, 2024 00:42
Copy link

google-cla bot commented Jun 12, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Jun 12, 2024
@Hajime-san Hajime-san force-pushed the fix-workspace-with-separeta-pullrequest branch from 044e6af to a944b75 Compare June 12, 2024 00:56
@@ -63,6 +65,7 @@ const pluginFactories: Record<string, PluginBuilder> = {
{
...options,
...(options.type as WorkspacePluginOptions),
merge: determineMerge(options),
Copy link
Contributor

Choose a reason for hiding this comment

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

This will override the merge option provided by the user (WorkspacePluginOptions has an optional merge).

Also, it seems weird for determineMerge to be checking to see which type of plugin is being configured. determineMerge is already called in a block chosen based on the plugin type. We should just explicitly set the default in the plugin factory for each type.

@@ -38,6 +39,7 @@ export interface PluginFactoryOptions {
targetBranch: string;
repositoryConfig: RepositoryConfig;
manifestPath: string;
separatePullRequests: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be optional and have a default value. The ability to register plugins and pluginFactories is part of the public API (PluginFactoryOptions). It's unlikely that someone is providing their own PluginFactoryOptions instance, but a default wouldn't hurt.

@Hajime-san
Copy link
Contributor Author

Thank you for checking @chingor13 !
Could you re-review the new change that is based on your pointing out?

@chingor13 chingor13 added this pull request to the merge queue Oct 1, 2024
Merged via the queue into googleapis:main with commit 15c75a9 Oct 1, 2024
11 checks passed
@Hajime-san Hajime-san deleted the fix-workspace-with-separeta-pullrequest branch October 2, 2024 01:57
chingor13 pushed a commit to googleapis/repo-automation-bots that referenced this pull request Oct 8, 2024
[16.14.2](googleapis/release-please@v16.14.1...v16.14.2)
(2024-10-08)
Bug Fixes
java-yoshi: match full artifact id when updating versions
(googleapis/release-please#2398)
([e062dc1](googleapis/release-please@e062dc1))
make workspace plugin with separate-pull-request fine
(googleapis/release-please#2310)
([15c75a9](googleapis/release-please@15c75a9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

separate-pull-requests + node-workspace plugin issues
2 participants