-
Notifications
You must be signed in to change notification settings - Fork 748
Description
Bug report
When fetching the Pipeline info from a remote git repository with a specified revision that contains special characters, the URL request doesn't encode the "revision" and results in a 404 "resource not found".
Expected behavior and actual behavior
Pipeline info is retrieved from repository with a revision with a special char.
Steps to reproduce the problem
Create a Github repository with some branch that contains a special character like a + for example.
When fetching the pipeline info for that repository and revision (in this example using Seqera Platform at pipeline creation time), you would experience a 404 not found error.
Environment
- Nextflow version: 25.07.0-edge
Additional context
Likely code of interest where URL query parameters need to be encoded:
nextflow/modules/nextflow/src/main/groovy/nextflow/scm/GithubRepositoryProvider.groovy
Lines 65 to 74 in fe62764
| @Override | |
| String getContentUrl( String path ) { | |
| // see | |
| // https://docs.github.com/en/rest/reference/repos#get-repository-content | |
| // | |
| def result = "${config.endpoint}/repos/$project/contents/$path" | |
| if( revision ) | |
| result += "?ref=$revision" | |
| return result | |
| } |