Skip to content

Fix avatar URLs #3069

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

Merged
merged 3 commits into from
Dec 3, 2017
Merged

Fix avatar URLs #3069

merged 3 commits into from
Dec 3, 2017

Conversation

ethantkoenig
Copy link
Member

@ethantkoenig ethantkoenig commented Dec 3, 2017

Fixes #3068. This PR also

  • Does some refactoring to use the net/url library instead of manually assembling URLs.
  • Uses identicons for the default avatar when a federated avatar service is enabled. Previously, the default was identicons if a federated service was not enabled, but the Gravatar logo if a federated service was enabled.

@ethantkoenig ethantkoenig force-pushed the fix/avatar_size branch 3 times, most recently from 6024f36 to d993e3b Compare December 3, 2017 00:49
@lafriks lafriks added this to the 1.4.0 milestone Dec 3, 2017
@codecov-io
Copy link

codecov-io commented Dec 3, 2017

Codecov Report

Merging #3069 into master will increase coverage by 0.03%.
The diff coverage is 48.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3069      +/-   ##
==========================================
+ Coverage   33.44%   33.47%   +0.03%     
==========================================
  Files         270      270              
  Lines       39564    39595      +31     
==========================================
+ Hits        13231    13255      +24     
- Misses      24441    24448       +7     
  Partials     1892     1892
Impacted Files Coverage Δ
models/user.go 40.39% <100%> (+0.12%) ⬆️
modules/setting/setting.go 46.93% <16.66%> (+0.01%) ⬆️
modules/base/tool.go 73.27% <54.83%> (-1.34%) ⬇️
models/issue.go 45.24% <0%> (+0.2%) ⬆️
models/error.go 32.72% <0%> (+0.61%) ⬆️
models/issue_indexer.go 67.53% <0%> (+2.59%) ⬆️

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 7bab3d2...3531074. 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 3, 2017
@@ -27,6 +27,8 @@ import (
"github.com/Unknwon/com"
"github.com/Unknwon/i18n"
"github.com/gogits/chardet"
"net/url"
Copy link
Member

Choose a reason for hiding this comment

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

import order

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@@ -9,6 +9,7 @@ import (
"github.com/Unknwon/i18n"
macaroni18n "github.com/go-macaron/i18n"
"github.com/stretchr/testify/assert"
"net/url"
Copy link
Member

Choose a reason for hiding this comment

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

import order

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@lunny
Copy link
Member

lunny commented Dec 3, 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 3, 2017
@lafriks
Copy link
Member

lafriks commented Dec 3, 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 3, 2017
@lunny lunny merged commit ab62da2 into go-gitea:master Dec 3, 2017
@ethantkoenig ethantkoenig deleted the fix/avatar_size branch December 4, 2017 04:21
@lunny
Copy link
Member

lunny commented Dec 4, 2017

also fixed #2941

@ufdada
Copy link

ufdada commented Dec 10, 2017

Any chance to get a backport to 3.1.x?

@lafriks
Copy link
Member

lafriks commented Dec 10, 2017

@ethantkoenig can you backport?

ethantkoenig added a commit to ethantkoenig/gitea that referenced this pull request Dec 11, 2017
* Fix avatar URLs

* import order
@lafriks lafriks added backport/done All backports for this PR have been created backport/v1.3 labels Dec 11, 2017
lunny pushed a commit that referenced this pull request Dec 11, 2017
* Fix avatar URLs

* import order
@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.

Misformatted gravatar URLs
6 participants