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

Fix legacy URL redirects #3100

Merged
merged 2 commits into from
Dec 7, 2017
Merged

Fix legacy URL redirects #3100

merged 2 commits into from
Dec 7, 2017

Conversation

ethantkoenig
Copy link
Member

Fix legacy URL redirects, which previously ignored the path component of the URL. Also adds tests.

For example, /user/repo/src/master/file.txt previously redirected to /user/repo/src/branch/master, but now redirects to /user/repo/src/branch/master/file.txt.

@codecov-io
Copy link

codecov-io commented Dec 6, 2017

Codecov Report

Merging #3100 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3100      +/-   ##
==========================================
+ Coverage   34.05%   34.07%   +0.02%     
==========================================
  Files         273      273              
  Lines       39998    40002       +4     
==========================================
+ Hits        13620    13632      +12     
+ Misses      24443    24429      -14     
- Partials     1935     1941       +6
Impacted Files Coverage Δ
modules/context/repo.go 59.88% <100%> (+0.31%) ⬆️
models/repo.go 38.15% <0%> (-0.19%) ⬇️
modules/indexer/repo.go 63.47% <0%> (+2.6%) ⬆️
models/repo_indexer.go 52.97% <0%> (+3.96%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 469ab99...f486691. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 6, 2017
@lafriks lafriks added this to the 1.4.0 milestone Dec 6, 2017
@lafriks
Copy link
Member

lafriks commented Dec 6, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 6, 2017
@Bwko
Copy link
Member

Bwko commented Dec 6, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 6, 2017
@lunny lunny merged commit 54907df into go-gitea:master Dec 7, 2017
@ethantkoenig ethantkoenig deleted the fix/redirect branch December 7, 2017 01:15
@lafriks
Copy link
Member

lafriks commented Dec 7, 2017

@ethantkoenig can you backport this?

ethantkoenig added a commit to ethantkoenig/gitea that referenced this pull request Dec 7, 2017
lafriks pushed a commit that referenced this pull request Dec 7, 2017
@lunny lunny added the backport/done All backports for this PR have been created label Dec 7, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants