Skip to content

Conversation

@mrsdizzie
Copy link
Member

Right now we only compare the hostname from a submodule with the prefixURL it is viewed from to check if the submodule is hosted on the same Gitea instance. This adds an additional check to compare it against SSH_DOMAIN as well since the same Gitea instance might have a different hostname for SSH and if the submodule uses that hostname we should also detect that and link to the proper DOMAIN value.

Fixes: #12747, #9756

Right now we only compare the hostname from a submodule with the prefixURL it is viewed from to check if the submodule is hosted on the same Gitea instance. This adds an additional check to compare it against SSH_DOMAIN as well since the same Gitea instance might have a different hostname for SSH and if the submodule uses that hostname we should also detect that and link to the proper DOMAIN value.

Fixes go-gitea#12747, go-gitea#9756
@mrsdizzie mrsdizzie added this to the 1.13.0 milestone Sep 6, 2020
@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2020

Codecov Report

Merging #12753 into master will decrease coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12753      +/-   ##
==========================================
- Coverage   43.30%   43.28%   -0.02%     
==========================================
  Files         647      647              
  Lines       71799    71800       +1     
==========================================
- Hits        31089    31078      -11     
- Misses      35672    35682      +10     
- Partials     5038     5040       +2     
Impacted Files Coverage Δ
modules/git/submodule.go 74.00% <60.00%> (ø)
routers/repo/view.go 38.11% <100.00%> (+0.13%) ⬆️
modules/util/timer.go 42.85% <0.00%> (-42.86%) ⬇️
modules/process/manager.go 72.50% <0.00%> (-2.50%) ⬇️
services/pull/check.go 47.69% <0.00%> (-2.31%) ⬇️
modules/log/event.go 57.54% <0.00%> (-1.89%) ⬇️
modules/queue/unique_queue_disk_channel.go 53.84% <0.00%> (-1.54%) ⬇️
models/error.go 34.81% <0.00%> (-0.52%) ⬇️
models/issue_comment.go 53.75% <0.00%> (-0.16%) ⬇️
services/pull/pull.go 41.57% <0.00%> (ø)
... and 2 more

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 9af60ce...27a5f96. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 7, 2020
@GiteaBot GiteaBot 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 Sep 7, 2020
@GiteaBot GiteaBot 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 Sep 7, 2020
@techknowlogick techknowlogick merged commit 489c8a1 into go-gitea:master Sep 8, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

Submodule links not recognized by web ui when SSH_DOMAIN is used

6 participants