-
Notifications
You must be signed in to change notification settings - Fork 490
feat: Add additional-paths config to specify dependencies outside of package
#2534
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
base: main
Are you sure you want to change the base?
feat: Add additional-paths config to specify dependencies outside of package
#2534
Conversation
Before, packagePaths was an array of strings, i.e. the name of each package. Now, packagePaths is a Record<string, string[]>, with the key being the name of each package, and the value being an aray of additionalPaths for that package.
|
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. |
|
If anyone needs this now you can swap out the release please action with: |
|
Hi, I'm actually trying to use your release please action but i'm facing an issue that I don't have on the official release in v4. My config :
The PR is created correctly, the files and commits from the other folders are detected correctly, but when I merge, I still have this error that I don't have with v4:
But I checked, I don't have any other PR than the one I just merged that is tagged "autorelease: pending". I checked your code I didn't see anything. |
|
oh yeah my bad - the action is actually running 2 commands, |
|
it would be good if the 1st party action supported using a fork but i had a look at it and it would be kinda painful to implement |
|
if you were using the outputs from action they wont work either now that you are effectively using the CLI |
|
Okay, great, I understand better! I hope this PR can be integrated quickly, thank you for your work. |
|
@chingor13 will this PR be merged any time soon ? It would greatly benefit in my repos |
|
Hi @stan-stately, Do you know if it's possible to implement the possibility to add files in additional-paths params, and not only folder ? |
|
@valdmne its possible but it's not 100% clear how to implement. the check is here: https://github.com/googleapis/release-please/pull/2534/files#diff-eb224286fa9cceeaa954fb6f0587f82c0d05a9b238ba7e3c47636a7c34b2cfa9R131: it doesn't match filenames because i append the i don't want to block this PR on this change because i might not have time to test it and it's not 100% obvious that this is the right choice. it would be better to do this in a follow up. for now, a possible workaround for you might be to put your file in a dedicated directory. although i understand that might not be possible |
|
Related: #2339 |
|
Would really like to see this feature being implemented as well |
|
Any update on this topic? It would be great for our usecase |
|
What is required to move this forward? I'm very interested in this functionality as we have a mono repository with several projects that share a gradle version catalog. When we make a change to the gradle version catalog, we would like to be able release all of our projects (e.g. new Spring Boot version) |
…package This adds support for the 'additional-paths' configuration option that allows a package to declare dependencies on file paths outside its main package directory. When commits modify files in these additional paths, they will be included in the release for the dependent package. This is useful for monorepos where multiple packages may depend on shared code that lives outside their package directories. Inspired by googleapis#2534 Co-Authored-By: Leo Galindo-Frias <[email protected]>
…package This adds support for the 'additional-paths' configuration option that allows a package to declare dependencies on file paths outside its main package directory. When commits modify files in these additional paths, they will be included in the release for the dependent package. This is useful for monorepos where multiple packages may depend on shared code that lives outside their package directories. Inspired by googleapis#2534 Co-Authored-By: Leo Galindo-Frias <[email protected]>
…package (#5) This adds support for the 'additional-paths' configuration option that allows a package to declare dependencies on file paths outside its main package directory. When commits modify files in these additional paths, they will be included in the release for the dependent package. This is useful for monorepos where multiple packages may depend on shared code that lives outside their package directories. Inspired by googleapis#2534 --- ## Summary of Changes ### Core Implementation - **schemas/config.json**: Added `additional-paths` schema definition (array of strings, manifest-only) - **src/manifest.ts**: Added `additionalPaths` to `ReleaserConfig` interface and updated `CommitSplit` instantiation to pass `Record<string, string[]>` format - **src/util/commit-split.ts**: Changed `packagePaths` type from `string[]` to `Record<string, string[]>` and implemented two-pass commit assignment: 1. First pass: assign commits to primary package based on main path 2. Second pass: assign commits to additional packages based on their `additional-paths` - **src/util/commit-utils.ts**: Extracted `normalizePath` function for single path normalization ### Tests - Added test fixture `test/fixtures/manifest/config/additional-paths.json` - Added test for reading `additional-paths` from manifest config - Added test for commits in `additionalPaths` triggering releases - Added test for commits belonging to multiple components via additional-paths - Updated existing `CommitSplit` tests to use new `Record<string, string[]>` format ### CI Fix - Updated `.github/workflows/ci.yaml` to reference `nominal-io/release-please` instead of `googleapis/release-please` for the build-action job ### Human Review Checklist - [ ] Verify the two-pass commit assignment logic in `commit-split.ts:98-140` correctly assigns commits to both primary and additional packages - [ ] Check that the dedupe Set properly prevents duplicate commit assignments while still allowing commits to be shared across packages via additional-paths - [ ] Confirm the `Record<string, string[]>` format change doesn't break any other usages --- **Link to Devin run**: https://app.devin.ai/sessions/60f42b0519ac4cd2bdd8ab1de108eddf **Requested by**: Leo Galindo-Frias (@Leundai) --- 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](https://github.com/googleapis/release-please/issues/new/choose) 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 #<issue_number_goes_here> 🦕 --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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:
Fixes #1921 #2167 #2466 #662 #1032 #1581 #2339 🦕
Hi. Just picking up @jack-lewin's work from here and addressing this specific comment:
I'm doing 2 passes of the incoming files:
core/lib/file.txttriggers an update forcore/libnotcoreadditional-pathscore/libandcoreare both updated whenshared/file.txtis updated as long as the haveadditional-paths: ["shared"]