Skip to content

feat(generic updater): supports component name in marker#2700

Open
awoimbee wants to merge 3 commits intogoogleapis:mainfrom
Extrality:aw/generic-updater-regex
Open

feat(generic updater): supports component name in marker#2700
awoimbee wants to merge 3 commits intogoogleapis:mainfrom
Extrality:aw/generic-updater-regex

Conversation

@awoimbee
Copy link

@awoimbee awoimbee commented Mar 10, 2026

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) <= There currently is no docs for the generic updater (AFAIK). I think some should be added, out of scope for this PR

Fixes #2699 🦕

Works great for my use-case:
image

@awoimbee awoimbee requested review from a team as code owners March 10, 2026 17:37
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Mar 10, 2026
@google-cla
Copy link

google-cla bot commented Mar 10, 2026

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.

@awoimbee awoimbee changed the title generic updater supports component name in marker feat(generic updater): supports component name in marker Mar 11, 2026
/x-release-please-start-(?<scope>major|minor|patch|version-date|version|date)/;
const INLINE_UPDATE_REGEX = (component?: string) =>
new RegExp(
`x-release-please(-${component})?-(?<scope>major|minor|patch|version-date|version|date)`
Copy link
Author

Choose a reason for hiding this comment

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

Note that I don't escape component here.
If that's required then we'll need a small custom helper (const escapeRegExp = (s: string) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');) since RegExp.escape() is part of nodejs 24 and this project advertises "node": ">=18.0.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using generic updater for a single file that contains multiple component's versions

2 participants