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

Incorrect API response for repositories without avatar #31167

Closed
jpraet opened this issue May 29, 2024 · 3 comments · Fixed by #31187
Closed

Incorrect API response for repositories without avatar #31167

jpraet opened this issue May 29, 2024 · 3 comments · Fixed by #31187
Labels
topic/api Concerns mainly the API type/bug
Milestone

Comments

@jpraet
Copy link
Member

jpraet commented May 29, 2024

Description

For repositories without an avatar, we now get this in the API response:

"avatar_url": "https://demo.gitea.com/"

In 1.21 this was "avatar_url": ""

Gitea Version

1.23.0+dev-151-gc93cbc991e

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

PostgreSQL

@jpraet jpraet added this to the 1.22.1 milestone May 29, 2024
@jpraet jpraet added the topic/api Concerns mainly the API label May 29, 2024
@jpraet
Copy link
Member Author

jpraet commented May 29, 2024

Regression from #30885 maybe?

lunny pushed a commit that referenced this issue Jun 1, 2024
)

Resolves #31167.

#30885 changed the behavior of
`repo.AvatarLink()` where it can now take the empty string and append it
to the app data URL. This does not point to a valid avatar image URL,
and, as the issue mentions, previous Gitea versions returned the empty
string.

---------

Co-authored-by: wxiaoguang <[email protected]>
@jpraet
Copy link
Member Author

jpraet commented Jul 4, 2024

Still broken in recently released 1.22.1, missing backport?

@jpraet jpraet reopened this Jul 4, 2024
jpraet pushed a commit to jpraet/gitea that referenced this issue Jul 5, 2024
…gitea#31187)

Backport go-gitea#31187

Resolves go-gitea#31167.

go-gitea#30885 changed the behavior of
`repo.AvatarLink()` where it can now take the empty string and append it
to the app data URL. This does not point to a valid avatar image URL,
and, as the issue mentions, previous Gitea versions returned the empty
string.

---------

Co-authored-by: wxiaoguang <[email protected]>
6543 pushed a commit that referenced this issue Jul 5, 2024
) (#31567)

Backport #31187

Resolves #31167.

#30885 changed the behavior of
`repo.AvatarLink()` where it can now take the empty string and append it
to the app data URL. This does not point to a valid avatar image URL,
and, as the issue mentions, previous Gitea versions returned the empty
string.

Co-authored-by: Kemal Zebari <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
@jpraet
Copy link
Member Author

jpraet commented Jul 5, 2024

Backported

@jpraet jpraet closed this as completed Jul 5, 2024
@lunny lunny modified the milestones: 1.22.1, 1.22.2 Jul 5, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/api Concerns mainly the API type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants