Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab raw URLs are broken with recent GitLab installs #670

Closed
rgl opened this issue Nov 8, 2020 · 2 comments · Fixed by #713
Closed

GitLab raw URLs are broken with recent GitLab installs #670

rgl opened this issue Nov 8, 2020 · 2 comments · Fixed by #713
Milestone

Comments

@rgl
Copy link
Contributor

rgl commented Nov 8, 2020

The current GitLab generates raw URLs alike:

https://gitlab.example.com/raw/example/example-dotnet-source-link/538b7a2b0d086146a6534bfe6f98a379191ea529/ExampleApplication/Program.cs

But in GitLab 13.5 (at least; didn't test with earlier version) they are broken. GitLab now needs this:

https://gitlab.example.com/example/example-dotnet-source-link/-/raw/538b7a2b0d086146a6534bfe6f98a379191ea529/ExampleApplication/Program.cs

I'm not really sure how to deal with older/newer URLs... would it be enough to submit a PR for changing the URL by changing the code at

=> UriUtilities.Combine(UriUtilities.Combine(contentUri.ToString(), relativeUrl), "raw/" + revisionId + "/*");
?

@tmat
Copy link
Member

tmat commented Nov 11, 2020

If the URL changed in a specific version forward we will need to do two things:

  1. default to the new format in the new Source Link package
  2. allow users to switch to the old behavior by specifying version of GitLab their repository is hosted on

The implementation for BitBucket already does this, so we would want to use a similar approach.

@rgl
Copy link
Contributor Author

rgl commented Apr 24, 2021

@tmat, finally got a chance to take a jab at this. Can you look at the TODOs in #713 and discuss how to address them?

@tmat tmat closed this as completed in #713 Aug 16, 2021
@tmat tmat added this to the 1.1.0 milestone Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants