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: new branchNameStrict configuration flag #17216

Merged
merged 16 commits into from Aug 19, 2022
Merged

feat: new branchNameStrict configuration flag #17216

merged 16 commits into from Aug 19, 2022

Conversation

setchy
Copy link
Collaborator

@setchy setchy commented Aug 16, 2022

Changes

Add new configuration option to specify whether branchNames should be very strict about any special characters within

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@setchy setchy changed the title branch name slugify strict mode feat: branch name slugify strict mode Aug 16, 2022
@rarkins
Copy link
Collaborator

rarkins commented Aug 17, 2022

If I was starting over, I'd choose this approach. But right now we have both open and closed PRs with branch names using non-strict slugifying which could be reopened or autoclosed. So I'm torn between just changing it to get it right now vs making this an opt-in option e.g. strictBranchSlugify

@setchy
Copy link
Collaborator Author

setchy commented Aug 17, 2022

If I was starting over, I'd choose this approach. But right now we have both open and closed PRs with branch names using non-strict slugifying which could be reopened or autoclosed. So I'm torn between just changing it to get it right now vs making this an opt-in option e.g. strictBranchSlugify

Ah, right. So an boolean configuration option that defaults to false?

@rarkins
Copy link
Collaborator

rarkins commented Aug 17, 2022

Let's start with that so there's no delay, we can always decide to make it default later.

docs/usage/configuration-options.md Outdated Show resolved Hide resolved
lib/workers/repository/updates/branch-name.spec.ts Outdated Show resolved Hide resolved
setchy and others added 4 commits August 17, 2022 15:32
Co-authored-by: Rhys Arkins <rhys@arkins.net>
rename new configuration to branchNameStrict so that it matches existing branch* and branchName* options

pivot to regex vs using slugify strict mode

additional tests
@setchy setchy changed the title feat: branch name slugify strict mode feat: new branchNameStrict configuration flag Aug 18, 2022
@rarkins rarkins enabled auto-merge (squash) August 19, 2022 21:00
@rarkins rarkins merged commit ca5be4b into renovatebot:main Aug 19, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.167.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
@setchy setchy added the type:feature Feature (new functionality) label May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid dots in branch names
4 participants