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

Fix non-alphabetic sorting of repo topics #28938

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

wackbyte
Copy link
Contributor

Desc("topic.repo_count") -> Asc("topic.name")

Description

This changes it so that when a repository's topics are synced, they are sorted in alphabetical order, fixing #28936 (see for more information).

Before:
List of topics A, C, and B in that order

After (by editing the topics to trigger a sync):
List of topics A, B, and C in that order

Questions

  1. Is this a good solution, or should the topics instead be sorted during the rendering of the template?
  2. Should there be a new DB migration to force-sync all repo topics, or would that not be necessary?

Issues

Closes #28936.

`Desc("topic.repo_count")` -> `Asc("topic.name")`
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 26, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 26, 2024
Copy link
Member

@KN4CK3R KN4CK3R left a comment

Choose a reason for hiding this comment

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

Alternative just sort on display.

@GiteaBot GiteaBot 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 Jan 26, 2024
@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 Jan 26, 2024
@jolheiser jolheiser enabled auto-merge (squash) January 26, 2024 13:50
@jolheiser jolheiser added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 26, 2024
@jolheiser jolheiser merged commit a240d5d into go-gitea:main Jan 26, 2024
25 checks passed
@GiteaBot GiteaBot added this to the 1.22.0 milestone Jan 26, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 26, 2024
@wackbyte wackbyte deleted the sort-topics-by-name branch January 26, 2024 15:30
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 29, 2024
* giteaofficial/main:
  [skip ci] Updated licenses and gitignores
  Fix bug for generated repository object format (go-gitea#28969)
  Fixing small space missing in sample config file (go-gitea#28967)
  Fix inconsistent naming of OAuth 2.0 `ENABLE` setting (go-gitea#28951)
  Add screenshot for "Profile Readmes" to docs (go-gitea#28964)
  Simplify how git repositories are opened (go-gitea#28937)
  Preserve BOM in web editor (go-gitea#28935)
  Make loading animation less aggressive (go-gitea#28955)
  Fix SSPI user creation (go-gitea#28948)
  Strip `/` from relative links (go-gitea#28932)
  Fix non-alphabetic sorting of repo topics (go-gitea#28938)
  Don't remove all mirror repository's releases when mirroring (go-gitea#28817)
  Use new RPM constants (go-gitea#28931)
  Check for sha256 support to use --object-format flag (go-gitea#28928)
  fix: update enable_prune even if mirror_interval is not provided (go-gitea#28905)
  Implement `MigrateRepository` for the actions notifier (go-gitea#28920)
  Respect branch info for relative links (go-gitea#28909)
henrygoodman pushed a commit to henrygoodman/gitea that referenced this pull request Jan 31, 2024
silverwind pushed a commit to silverwind/gitea that referenced this pull request Feb 20, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Displayed order of topics is inconsistent between repo list and repo page
5 participants