Skip to content

Special characters in repository revision not encoded in request to remote repository #6441

@georgi-seqera

Description

@georgi-seqera

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.

Image

Environment

  • Nextflow version: 25.07.0-edge

Additional context

Likely code of interest where URL query parameters need to be encoded:

@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
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions