GitlabRepositoryProvider now handles leading slashes for content URLs#6284
Merged
pditommaso merged 2 commits intomasterfrom Jul 17, 2025
Merged
GitlabRepositoryProvider now handles leading slashes for content URLs#6284pditommaso merged 2 commits intomasterfrom
pditommaso merged 2 commits intomasterfrom
Conversation
✅ Deploy Preview for nextflow-docs-staging canceled.
|
…t URLs Signed-off-by: Author Name <nathan.johnson@seqera.io>
9dece2b to
cbd7219
Compare
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
pditommaso
approved these changes
Jul 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A tiny change to handle leading slashes for GitLab content URLs. Leading forward slashes in relative content URLs are generally handles well by the repo providers, but GitLab does things a little differently. Instead of handling the entire URL path as an endpoint URL, it encodes the content URL as a single portion of the URL:
"${config.endpoint}/api/v4/projects/${getProjectName()}/repository/files/${encodedPath}?ref=${ref}"Any leading slash in the
encodedPathpart results in a 400. This is currently uncaught by nextflow.scm.RepositoryProvider#checkResponse, and results in a null value being returned.This PR simply strips leading slashes from content URLs for gitlab, resolving the problem.