Skip to content

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Feb 9, 2023

In Go code, HTMLURL should be only used for external systems, like API/webhook/mail/notification, etc.

If a URL is used by Redirect or rendered in a template, it should be a relative URL (aka Link() in Gitea)

techknowlogick pushed a commit that referenced this pull request Feb 9, 2023
After some PRs:
* #21986
* #22795
* #22808
* #22831
* #22839

Users won't be affected by the ROOT_URL problem in most cases. Close
#19345

This PR improves AppUrl/ROOT_URL checking, only check it on the admin
page, and the message is also updated.

Feel free to suggest about more English-native messages.



![image](https://user-images.githubusercontent.com/2114189/217811809-7d44ddb7-2c4a-46d0-a5db-8ae6ee65f8c3.png)
@techknowlogick techknowlogick added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Feb 9, 2023
@techknowlogick techknowlogick added this to the 1.19.0 milestone Feb 9, 2023
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 9, 2023
@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 Feb 10, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 10, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #22839 (ea2981b) into main (affdd40) will increase coverage by 0.00%.
The diff coverage is 18.18%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main   #22839   +/-   ##
=======================================
  Coverage   47.30%   47.31%           
=======================================
  Files        1113     1113           
  Lines      150077   150077           
=======================================
+ Hits        70987    71002   +15     
+ Misses      70657    70646   -11     
+ Partials     8433     8429    -4     
Impacted Files Coverage Δ
models/repo/repo.go 65.54% <0.00%> (ø)
modules/context/repo.go 53.16% <0.00%> (ø)
routers/web/repo/actions/actions.go 0.00% <0.00%> (ø)
routers/web/repo/issue_dependency.go 0.00% <0.00%> (ø)
routers/web/repo/issue_lock.go 0.00% <0.00%> (ø)
routers/web/repo/issue_timetrack.go 0.00% <0.00%> (ø)
routers/web/repo/issue_watch.go 0.00% <0.00%> (ø)
routers/web/repo/pull_review.go 0.00% <0.00%> (ø)
routers/web/repo/release.go 27.75% <0.00%> (ø)
routers/web/repo/repo.go 19.82% <0.00%> (ø)
... and 23 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lunny
Copy link
Member

lunny commented Feb 11, 2023

LG-TM bot

@lunny lunny merged commit e9288c2 into go-gitea:main Feb 11, 2023
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 11, 2023
@wxiaoguang wxiaoguang deleted the fix-htmlurl branch February 11, 2023 08:39
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 13, 2023
* upstream/main:
  Add some headings to repo views (go-gitea#22869)
  Fix style of actions rerun button (go-gitea#22835)
  Make issue and code search support camel case (go-gitea#22829)
  Revert "Fix notification and stopwatch empty states" (go-gitea#22876)
  Deduplicate findReadmeFile() (go-gitea#22177)
  Fix milestone title font problem (go-gitea#22863)
  Fix PR file tree folders no longer collapsing (go-gitea#22864)
  escape filename when assemble URL (go-gitea#22850)
  Fix notification and stopwatch empty states (go-gitea#22845)
  Fix .golangci.yml (go-gitea#22868)
  Fix migration issue. (go-gitea#22867)
  Add `/$count` endpoints for NuGet v2 (go-gitea#22855)
  Preview images for Issue cards in Project Board view (go-gitea#22112)
  Fix improper HTMLURL usages in Go code (go-gitea#22839)
  Use proxy for pull mirror (go-gitea#22771)
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants