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

In many cases user avatar link should be an absolute URL with http host #17420

Merged
merged 4 commits into from Oct 25, 2021

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 Issue needs no code to be fixed, only a description on how to fix it yourself 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
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
@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.

models/user_avatar.go Show resolved Hide resolved
integrations/user_avatar_test.go Show resolved Hide resolved
@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 Issue needs no code to be fixed, only a description on how to fix it yourself 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.

None yet

6 participants