Skip to content

frontend: include the rest of URL paramters when handling renamed repositories

Warren Gifford requested to merge redir into master

Created by: ggilmore

Fixes https://github.com/sourcegraph/sourcegraph/issues/2049

Previously when handling repository redirects, our API would only respond with the link to the base repository page and ignored all the other request parameters. This PR fixes that behavior through the use of handlerutil.RedirectToNewRepoName:

https://github.com/sourcegraph/sourcegraph/blob/037947175957ac02bf867595dacb1455ed6fdc76/cmd/frontend/internal/pkg/handlerutil/repo.go#L61-L80


Before:

github.com/foo/Bar@123456/-/blob/main.go -> github.com/foo/bar

After:

github.com/foo/Bar@123456/-/blob/main.go -> github.com/foo/bar@123456/-/blob/main.go

Merge request reports

Loading