Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Issue with getting raw files #1843

Open
@nchursin

Description

Hi

I have an issue getting a raw file from a repo. I found the source, but not sure how to fix this.

In GetRawFile there's a URL construction like this:

u := fmt.Sprintf(
      "projects/%s/repository/files/%s",
      PathEscape(project),
      PathEscape(fileName),
)

req, err := s.client.NewRequest(http.MethodGet, u, opt, options)

But NewRequest unescapes the u back to regular URL, which causes 404 in gitlab.

unescaped, err := url.PathUnescape(path)

Any ideas how to fix this, without breaking all the other stuff? :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions