-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(platform/bitbucket-server): do not force lowercase project keys in autodiscover mode #23261
fix(platform/bitbucket-server): do not force lowercase project keys in autodiscover mode #23261
Conversation
…autodiscover mode
Co-authored-by: Rhys Arkins <rhys@arkins.net>
🎉 This PR is included in version 36.5.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Just wanted to share that I'm 99% sure this change broke Renovate for us. We use Bitbucket Server where the projects have uppercase keys and our Renovate configuration used lowercase keys due to what's explained in #23158. The diff of this PR would suggest this change is backwards compatible but until I changed our configuration to use uppercase project keys Renovate would return None of the discovered repositories matched the filter. I'm missing tests for regex-based autodiscover filters so that could be the reason? Here's a simplified regex with the required changes. -export RENOVATE_AUTODISCOVER_FILTER="/^project/(repo-|repo-b|.*-app)$/"
+export RENOVATE_AUTODISCOVER_FILTER="/^PROJECT/(repo-|repo-b|.*-app)$/" |
@cascornelissen, yes, when using regular expressions, it is expectedly case-sensitive. I was thinking about programmatically appending |
Yeah, I understand there isn't an obvious fix for it. What might be interesting is that I first tried to append Not putting blame on anyone, just wanted to share what we ran into and how we solved it, in case others also ran into this. One final remark is that it confused me that our builds succeeded. I'm not sure if an error exit code makes sense if the autodiscover filter doesn't detect any repositories for example. |
Changes
autodiscoverFilter
need to be lower-cased to be foundautodiscoverFilter
search using minimatch case-insensitiveContext
getRepos()
withr.project.key.toLowerCase()
but included no reasoning why this was needed.Notes:
/rest/api/1.0/repos
returns the project key as-is (see here or here for sample responses)Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
Also verified by following the instructions outlined here, creating a project key with uppercase letters, adding a repository, enabling autodiscovery, and defining
autodiscoverFilter
with a project key that was once uppercase-only, once lower-case only.