fix(datasource/go): Remove .git suffix for go dependencies when calling go-get api#32181
Conversation
Signed-off-by: malmor <62105800+malmor@users.noreply.github.com>
|
@malmor no need to merge from main unless it's conflicted |
zharinov
left a comment
There was a problem hiding this comment.
I don't have a self-hosted GitLab intance with some go package to test against, but code looks okay 🤷♂️
|
FYI @zharinov if you want to test these kind of changes (now or in the future) you could use the GitLab docker image which can be run locally: https://docs.gitlab.com/ee/install/docker/installation.html # Docs: https://docs.gitlab.com/ee/install/docker/installation.html
# Images: https://hub.docker.com/r/gitlab/gitlab-ce/tags
version: "3.8"
services:
gitlab:
image: gitlab/gitlab-ce:17.4.2-ce.0
container_name: gitlab
restart: always
hostname: "git.dev.local"
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://git.dev.local'
ports:
- "80:80"
- "443:443"
# - "22:22"
volumes:
- "./config:/etc/gitlab"
- "./logs:/var/log/gitlab"
- "./data:/var/opt/gitlab"
shm_size: "256m"I did have a few issues with certificates (didn't want to spend much time troubleshooting Let's Encrypt), but afterwards you have an empty GitLab instance where you can create projects, groups, ... and play around with different changes 😃 |
|
Oh yes, we want to know how to test this better, thank you |
|
🎉 This PR is included in version 38.134.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
Thanks a lot for merging this - I can confirm that the issue has been fixed after upgrading to v38.134.1 🚀 |
|
Thanks for the PR! |
Changes
This PR fixes the way Renovate calls the
go-getAPI endpoint when looking forgopackages. This is specifically important when working with private GitLab repositories because the API returnsHTTP 404when the.gitsuffix is part of the request URL:The updated regex will strip of any
.gitsuffix and additional subfolders, not only.git/v2. The regex can be tested here: https://regex101.com/r/PQbIdY/2Context
See #32105 for more information
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: