Skip to content

Conversation

@wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Oct 24, 2021

In many cases user avatar link should be an absolute URL with http host. eg: for API, for webhook.

The last PR (#17123) about user avatar refactoring make AvatarLink always returns relative URL, it is incorrect.

This PR makes AvatarLink return the absolute URL as before.

@wxiaoguang wxiaoguang added type/bug issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change labels Oct 24, 2021
@wxiaoguang wxiaoguang added this to the 1.16.0 milestone Oct 24, 2021
@wxiaoguang wxiaoguang added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Oct 24, 2021
@wxiaoguang wxiaoguang force-pushed the user-avatar-link-abs branch from 5232a66 to 7d20c0c Compare October 24, 2021 16:37
Copy link
Member

@jolheiser jolheiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming tests pass

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 24, 2021
@wxiaoguang wxiaoguang force-pushed the user-avatar-link-abs branch from 4bda920 to 45e0325 Compare October 24, 2021 16:58
@wxiaoguang wxiaoguang force-pushed the user-avatar-link-abs branch from 45e0325 to d2fbf31 Compare October 24, 2021 16:58
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2021

Codecov Report

Merging #17420 (c290d38) into main (44f2c27) will increase coverage by 0.15%.
The diff coverage is 61.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #17420      +/-   ##
==========================================
+ Coverage   45.24%   45.40%   +0.15%     
==========================================
  Files         789      791       +2     
  Lines       88441    88674     +233     
==========================================
+ Hits        40017    40262     +245     
+ Misses      41944    41900      -44     
- Partials     6480     6512      +32     
Impacted Files Coverage Δ
routers/api/v1/repo/wiki.go 53.51% <53.51%> (ø)
routers/api/v1/api.go 78.31% <76.92%> (-0.03%) ⬇️
models/user_avatar.go 45.67% <100.00%> (+2.08%) ⬆️
modules/convert/wiki.go 100.00% <100.00%> (ø)
models/gpg_key_common.go 59.67% <0.00%> (-4.84%) ⬇️
modules/charset/charset.go 71.71% <0.00%> (-2.03%) ⬇️
services/gitdiff/gitdiff.go 73.25% <0.00%> (-0.89%) ⬇️
models/repo_list.go 77.64% <0.00%> (-0.79%) ⬇️
models/error.go 39.51% <0.00%> (+0.48%) ⬆️
routers/api/v1/repo/pull.go 29.35% <0.00%> (+0.51%) ⬆️
... and 14 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 3676faf...c290d38. Read the comment docs.

@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 Oct 25, 2021
@lunny lunny merged commit 7c951fd into go-gitea:main Oct 25, 2021
@wxiaoguang wxiaoguang deleted the user-avatar-link-abs branch October 25, 2021 05:03
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change 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.

6 participants