Skip to content

enhance(repo): add custom name (display name) to repositories - #39208

Draft
oierxjn wants to merge 7 commits into
go-gitea:mainfrom
oierxjn:feat/repo-display-name-upstream
Draft

enhance(repo): add custom name (display name) to repositories#39208
oierxjn wants to merge 7 commits into
go-gitea:mainfrom
oierxjn:feat/repo-display-name-upstream

Conversation

@oierxjn

@oierxjn oierxjn commented Sep 2, 2026

Copy link
Copy Markdown

Add an optional, Unicode-friendly display name (custom name) for repositories, decoupled from the ASCII path name used in URLs, git and SSH. When unset, everything renders exactly as before.

Usage: repository owners set "Custom name" on the repo settings page (or via custom_name in the create/edit API). It is shown in the repo header, repo lists, settings/admin lists and page/og meta; URLs, git and SSH keep using the repository name, and the path name stays available as a tooltip. Repo search also matches the custom name.

Testing: a unit test covers the DisplayName() fallback logic; create/edit API plumbing reuses the existing handlers; templates pass the repo's djlint profile. Screenshots will be added once the UI can be run locally (draft).

Implements the long-standing human-readable project name request: #9032

Add an optional Unicode-friendly display name decoupled from the ASCII
repository name used in URLs, git and SSH paths. DisplayName() falls back
to the repository name when unset, so existing repositories render unchanged.

Assisted-by: deepseek-v4-flash
Allow setting the custom name on repository create/edit and include it in
repository payloads. Regenerated the swagger spec.

Assisted-by: deepseek-v4-flash
Add the custom name input to the create-repository form and the basic
settings form, wired through the existing form handlers.

Assisted-by: deepseek-v4-flash
Show DisplayName() in the repository header, the shared repo list (used by
explore, profile, org home, forks and more), settings and admin lists, and
page/og meta titles. The raw repository name is kept as a tooltip and
remains the search identity. Repo search now also matches the custom name.

Assisted-by: deepseek-v4-flash
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 2, 2026
@oierxjn

oierxjn commented Sep 2, 2026

Copy link
Copy Markdown
Author

Draft for review. Branch base is upstream main; if maintainers prefer a different field name (e.g. display_name) or a narrower UI scope, the branch will be updated with new commits.

Authored with assistance from deepseek-v4-flash.

checks-backend's openapi3-check failed because only the Swagger 2.0
spec was regenerated; the OpenAPI 3.0 spec is derived from it.

Assisted-by: deepseek-v4-flash
Address Copilot review: the always-on keyword match against custom_name had
no test coverage. Extend TestSearchRepository with a Unicode custom name
fixture case, mirroring the existing description keyword tests.

Assisted-by: deepseek-v4-flash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants