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(auto-approve): update regex for Node #5064

Merged
merged 3 commits into from
May 23, 2023
Merged

fix(auto-approve): update regex for Node #5064

merged 3 commits into from
May 23, 2023

Conversation

sofisl
Copy link
Contributor

@sofisl sofisl commented May 18, 2023

Some strange PRs have prompted looking into the pattern being used.

titleRegex: /^(fix|chore)\(deps\): update dependency (@?\S*) to v(\S*)$/,
titleRegex:
// This would match: fix(deps): update dependency @octokit/rest to v19.0.8 or ^0.23.0 or ~0.23.0
/^(fix|chore)\(deps\): update dependency (@?\S*) to v?\^?~?(\S*)$/,
Copy link
Contributor

Choose a reason for hiding this comment

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

If we know there's at least one of v, ^, or ~, put it in a character group:

Suggested change
/^(fix|chore)\(deps\): update dependency (@?\S*) to v?\^?~?(\S*)$/,
/^(fix|chore)\(deps\): update dependency (@?\S*) to [v\^~](\S*)$/,

Copy link
Contributor Author

@sofisl sofisl May 19, 2023

Choose a reason for hiding this comment

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

I don't think we know for sure, although I haven't seen it without one of those yet. But I think it would be safer the way I have it, since then we could just accept the number, for example:

fix(deps): update dependency recast to 0.23.0

This would be a valid configuration, since the ^ and ~ are just accepting larger ranges, which don't necessarily have to be the case.

@sofisl sofisl merged commit e77a781 into main May 23, 2023
@sofisl sofisl deleted the nodeRegexUpdates branch May 23, 2023 19:04
@release-please release-please bot mentioned this pull request Aug 21, 2023
@release-please release-please bot mentioned this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants