Remove “Adopt Repository” from Gitea UI and Backend, Implement Equivalent in tea CLI #14850

Open
opened 2025-11-02 11:24:24 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @lunny on GitHub (Aug 9, 2025).

Feature Description

We propose removing the “Adopt Repository” feature from the Gitea web UI and backend, while introducing a similar capability in the tea command-line tool.

Rationale

  • The feature is rarely used via the web UI and adds unnecessary complexity to the Gitea core codebase.
  • Moving this functionality to the tea CLI keeps the Gitea UI simpler and more user-friendly, while still providing advanced users with the same capability.
  • This change aligns with the goal of keeping the web interface focused on common workflows and moving niche or administrative actions to CLI tooling.

Proposed Changes:

Gitea Backend/UI

  • Remove all backend logic, API endpoints to adopting repositories.
  • Remove the corresponding UI components.
  • Update documentation and translations accordingly.

tea CLI

  • Add a new command (e.g., tea repo adopt) to provide equivalent repository adoption functionality.
  • Support the same validation and permission checks as the original feature.
  • Ensure proper error handling and user feedback in CLI output.

Screenshots

No response

Originally created by @lunny on GitHub (Aug 9, 2025). ### Feature Description We propose removing the “Adopt Repository” feature from the Gitea web UI and backend, while introducing a similar capability in the tea command-line tool. ## Rationale - The feature is rarely used via the web UI and adds unnecessary complexity to the Gitea core codebase. - Moving this functionality to the tea CLI keeps the Gitea UI simpler and more user-friendly, while still providing advanced users with the same capability. - This change aligns with the goal of keeping the web interface focused on common workflows and moving niche or administrative actions to CLI tooling. ## Proposed Changes: ### Gitea Backend/UI - Remove all backend logic, API endpoints to adopting repositories. - Remove the corresponding UI components. - Update documentation and translations accordingly. ### tea CLI - Add a new command (e.g., tea repo adopt) to provide equivalent repository adoption functionality. - Support the same validation and permission checks as the original feature. - Ensure proper error handling and user feedback in CLI output. ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 11:24:24 -06:00
Author
Owner

@karthikbhandary2 commented on GitHub (Aug 10, 2025):

I think it’s better to keep the API available. If needed, we can remove it from the UI, but retaining it as an API would still provide flexibility. Just sharing my opinion here.

@karthikbhandary2 commented on GitHub (Aug 10, 2025): I think it’s better to keep the API available. If needed, we can remove it from the UI, but retaining it as an API would still provide flexibility. Just sharing my opinion here.
Author
Owner

@TheFox0x7 commented on GitHub (Aug 10, 2025):

Don't you mean gitea CLI? AFAIK tea relies on API do adopting a repository without an API endpoint for it would be impossible.
Unless I'm misunderstanding the idea. Adopting repositories was a feature for when gitea looses track of a repo that's already in gitea's storage was it not? At least that's the main usecase I saw around

@TheFox0x7 commented on GitHub (Aug 10, 2025): Don't you mean gitea CLI? AFAIK tea relies on API do adopting a repository without an API endpoint for it would be impossible. Unless I'm misunderstanding the idea. Adopting repositories was a feature for when gitea looses track of a repo that's already in gitea's storage was it not? At least that's the main usecase I saw around
Author
Owner

@karthikbhandary2 commented on GitHub (Aug 10, 2025):

Adopting repositories was a feature for when gitea looses track of a repo that's already in gitea's storage was it not?

yes.

@karthikbhandary2 commented on GitHub (Aug 10, 2025): > Adopting repositories was a feature for when gitea looses track of a repo that's already in gitea's storage was it not? yes.
Author
Owner

@lunny commented on GitHub (Aug 13, 2025):

Don't you mean gitea CLI? AFAIK tea relies on API do adopting a repository without an API endpoint for it would be impossible.
Unless I'm misunderstanding the idea. Adopting repositories was a feature for when gitea looses track of a repo that's already in gitea's storage was it not? At least that's the main usecase I saw around

I mean tea. The tea adopt command differs from Gitea’s adoption concept—it appears to function more like a batch repository upload command. It can also be used to recover disk repositories if the database information is lost, or to restore from another machine or folder. In contrast, the current Gitea adoption feature assumes the repositories already exist in the same folder.

@lunny commented on GitHub (Aug 13, 2025): > Don't you mean gitea CLI? AFAIK tea relies on API do adopting a repository without an API endpoint for it would be impossible. Unless I'm misunderstanding the idea. Adopting repositories was a feature for when gitea looses track of a repo that's already in gitea's storage was it not? At least that's the main usecase I saw around I mean tea. The tea adopt command differs from Gitea’s adoption concept—it appears to function more like a batch repository upload command. It can also be used to recover disk repositories if the database information is lost, or to restore from another machine or folder. In contrast, the current Gitea adoption feature assumes the repositories already exist in the same folder.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14850