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(branchNameStrict)!: remove forward slashes from non-prefix part of branchName #32278

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

rarkins
Copy link
Collaborator

@rarkins rarkins commented Nov 1, 2024

Changes

When branchNameStrict=true, Renovate will now:

  • Not make any changes to branchPrefix
  • Remove any / characters from the remaining part of the branch name (not including branchPrefix)

This means you can choose whether you want either:

  • 1 slash in the branch name (e.g. renovate/jest-42-x) by leaving branchPrefix as is, or
  • No slashes in the branch name (e.g. renovate-jest-42-x) by also settings branchPrefix="renovate-"

Context

The docs say that Renovate removes special characters, but previous behavior did not fully.

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 select 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
Copy link
Collaborator

setchy commented Nov 1, 2024

This will be a breaking change for us (and others) unless we coordinate setting branchPrefix too

@rarkins rarkins added the breaking Breaking change, requires major version bump label Nov 1, 2024
@rarkins rarkins merged commit 2cb428e into v39 Nov 1, 2024
37 checks passed
@rarkins rarkins deleted the fix/32231-branch-name-more-strict branch November 1, 2024 15:01
rarkins added a commit that referenced this pull request Nov 4, 2024
…of branchName (#32278)

Update logic for branchNameStrict=true so that it also removes forward slashes from branch names, with the exception of the `branchPrefix` part. In other words, if you leave the default `branchPrefix="renovate/"` then you'll get branch names like `renovate/foo-bar-42-x` instead of today's `renovate/foo/bar-42-x`.

BREAKING CHANGE: Branch names with multiple forward slashes will change if branchNameStrict=true
rarkins added a commit that referenced this pull request Nov 4, 2024
…of branchName (#32278)

Update logic for branchNameStrict=true so that it also removes forward slashes from branch names, with the exception of the `branchPrefix` part. In other words, if you leave the default `branchPrefix="renovate/"` then you'll get branch names like `renovate/foo-bar-42-x` instead of today's `renovate/foo/bar-42-x`.

BREAKING CHANGE: Branch names with multiple forward slashes will change if branchNameStrict=true
rarkins added a commit that referenced this pull request Nov 4, 2024
…of branchName (#32278)

Update logic for branchNameStrict=true so that it also removes forward slashes from branch names, with the exception of the `branchPrefix` part. In other words, if you leave the default `branchPrefix="renovate/"` then you'll get branch names like `renovate/foo-bar-42-x` instead of today's `renovate/foo/bar-42-x`.

BREAKING CHANGE: Branch names with multiple forward slashes will change if branchNameStrict=true
rarkins added a commit that referenced this pull request Nov 4, 2024
…of branchName (#32278)

Update logic for branchNameStrict=true so that it also removes forward slashes from branch names, with the exception of the `branchPrefix` part. In other words, if you leave the default `branchPrefix="renovate/"` then you'll get branch names like `renovate/foo-bar-42-x` instead of today's `renovate/foo/bar-42-x`.

BREAKING CHANGE: Branch names with multiple forward slashes will change if branchNameStrict=true
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change, requires major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants