branchNameStrict is not working as expected #39892
Replies: 2 comments
-
|
Hi there, Please help this Discussion progress by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. Please follow these steps:
If you need help with running Renovate on your minimal reproduction repository, please refer to our Running Renovate guide. The Renovate team |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I had a quick look at the code. The reason for the described behavior is as follows:
renovate/lib/workers/repository/process/index.ts Lines 97 to 100 in c7586ae
renovate/lib/workers/repository/updates/branch-name.ts Lines 34 to 43 in c7586ae I assume the decision not to filter the prefix was based on the idea that an existing branch name must always be valid, and because the default In my case, the Renovate branch name now matches the GitLab protected branch pattern and therefore becomes protected. This means that the Renovate bot is not allowed to push its changes to the branch, and as an additional side effect, the branch cannot be amended or deleted by a regular user. I cannot change the protection pattern because GitLab unfortunately does not support regular expressions for this purpose (see https://gitlab.com/groups/gitlab-org/-/epics/15243). As a workaround, I am now using the deprecated I would suggest removing the special handling from Regards, Stefan |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
Self-hosted Renovate
Which platform you running Renovate on?
GitLab (.com or self-hosted)
Which version of Renovate are you using?
41.143.1
Please tell us more about your question or problem
We have set the property "branchNameStrict": true, but the branch names still contains "." characters.
config:
In our case we use 2 sets of basebranches:
as soon as there is a new almalinux version renovate tries to create a new branch, but with the following name:
And in the renovate branch name there are some special characters according to the documentation:
Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions