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

DEFAULT_SHOW_FULL_NAME is not respected in RSS feeds #31491

Closed
na-Itms opened this issue Jun 25, 2024 · 2 comments · Fixed by #31687
Closed

DEFAULT_SHOW_FULL_NAME is not respected in RSS feeds #31491

na-Itms opened this issue Jun 25, 2024 · 2 comments · Fixed by #31687
Labels

Comments

@na-Itms
Copy link

na-Itms commented Jun 25, 2024

Description

This is a follow-up on #20446 and #30096.

When the config option DEFAULT_SHOW_FULL_NAME is set to false, since Gitea 1.22, full names correctly don't appear anymore in commit lists. However, full names are still displayed in the RSS feed. We wish to use RSS feeds for our IRC notification bot and this introduces an unwanted discrepancy.

This can't be reproduced on the test instance, where DEFAULT_SHOW_FULL_NAME seems to be true.


If I'm not mistaken, this line

title = act.ActUser.DisplayName() + " "

should be

title = act.GetActDisplayName() + " "

in order for the code to access the config value.

I noticed there is also a GetActDisplayNameTitle method but the logic below

// GetActDisplayNameTitle gets the action's display name used for the title (tooltip) based on DEFAULT_SHOW_FULL_NAME
func (a *Action) GetActDisplayNameTitle(ctx context.Context) string {
if setting.UI.DefaultShowFullName {
return a.ShortActUserName(ctx)
}
return a.GetActFullName(ctx)
}

seems incorrect, unless I don't understand the aim of that method.

I read in #30096 (comment) that those code paths need a rewriting, in which case this issue could be used to track the task.


I am not confident enough in my understanding of the code to propose a PR yet, but I would be happy to contribute fixes. We would be very grateful to have a fix for the RSS feeds as soon as possible.

Thank you in advance.

Gitea Version

1.22

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu 22.04

How are you running Gitea?

Gitea 1.22 from binary download, run as a custom systemd service.

Database

MySQL/MariaDB

@na-Itms
Copy link
Author

na-Itms commented Jun 26, 2024

DEFAULT_SHOW_FULL_NAME is not respected either in the Contributors view of the Activity panel. 🤕

@silverwind
Copy link
Member

I have not checked in detail, but it seems this GetActDisplayNameTitle should be moved out of actions-specific code and moved into another shared module to be used throughout the UI. I think it's likely that such a function already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants