Skip to content

feat: implement reputation labels for repositories and organizations (#36334)#38335

Draft
mmarhin wants to merge 2 commits into
go-gitea:mainfrom
mmarhin:feature/reputation-labels
Draft

feat: implement reputation labels for repositories and organizations (#36334)#38335
mmarhin wants to merge 2 commits into
go-gitea:mainfrom
mmarhin:feature/reputation-labels

Conversation

@mmarhin

@mmarhin mmarhin commented Jul 5, 2026

Copy link
Copy Markdown

This PR implements reputation labels (badges) for Repositories and Organizations, resolving issue #36334 as suggested by @AdamMajer. The existing User Badge system has been extended to support OrgBadge and RepoBadge mappings. Badges are now displayed in the Admin panel and on the Explore pages."

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 5, 2026
@mmarhin mmarhin changed the title Implement Reputation Labels for Repositories and Organizations (#36334) feat: implement reputation labels for repositories and organizations (#36334) Jul 5, 2026
@github-actions github-actions Bot added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jul 5, 2026
@mmarhin

mmarhin commented Jul 5, 2026

Copy link
Copy Markdown
Author

This PR fully implements the "Reputation labels" for Repositories and Organizations as requested by @AdamMajer in issue #36334.

Instead of reinventing the wheel, this expands the existing User Badge system by introducing OrgBadge and RepoBadge mappings, keeping the core database schema clean and backwards-compatible.

What changed:

  • Backend/Admin: Added endpoints and UI in the Admin panel to manage and assign badges not just to Users, but also to Repositories and Organizations (using Gitea's native autocomplete).
  • Frontend/Explore: Modified the Explore pages so that if a Repository or Organization has an assigned badge, it correctly loads and renders the "Reputation Label" next to its name.

Screenshots

  1. Admin Panel (Assigning Badges to Repos & Orgs):
Screenshot 2026-07-05 at 21 16 18 Screenshot 2026-07-05 at 21 17 24
  1. Public View (Reputation Label on Explore Page):
image image

@mmarhin mmarhin force-pushed the feature/reputation-labels branch from d69599d to 3bf9f18 Compare July 5, 2026 19:53
@mmarhin mmarhin force-pushed the feature/reputation-labels branch from 3bf9f18 to 91bacf0 Compare July 5, 2026 19:55

@bircni bircni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • I don't think that's how user badges were supposed to be used for
    Also it already states in its name..
    userbadge

  • the UI for the verification doesn't really follow gitea's UI + is just too large - is it only being rendered in the Explore Page? What about all the other pages?

  • also see my comment here - I think it is kinda clear #36334 (comment)

  • there should be one badge/reputation tmpl which gets reused so it can be applied more easily

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 5, 2026
@bircni bircni marked this pull request as draft July 5, 2026 20:19
- Move Badge model out of user_model to a generic badges package
- Implement shared badge template for consistent UI
- Refine badge sizing and rendering to match Gitea's native repository labels
- Display badges in organization and repository headers
@mmarhin mmarhin requested a review from bircni July 8, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants