refactor: remove features beyond the UX plan

Drop additions that the UX plan does not ask for:

- the interactive label edit form; label edit now requires a flag
- label clone and the skip mode of label creation it needed
- repo rename rewriting the Git remote or tea.repository; it now
  warns that the remote still points to the old name
- the extra "source" remote on clones of pull mirrors
- run artifact download, which duplicates run download --zip
- 256-color and 24-bit label swatches; colors stay ANSI 16
- config list --show-source (config get keeps it)
- the membership and access GETs before team member/repo add and
  remove; Gitea's PUT and DELETE are idempotent

label edit/delete keep --by-name: it is the only way to address a
label whose name is a number that is also another label's ID.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 10:36:50 +02:00
1 parent 2ec16292f5
commit ea13c9e4f5
22 files changed
+69 -560

No files matched your search

+2 -38
View File
@@ -537,14 +537,6 @@ $ tea team member add 2 bob carol`,
return err
}
for _, username := range args[1:] {
member, err := service.IsMember(cmd.Context(), team.ID, username)
if err != nil {
return err
}
if member {
a.warn(cmd, "%s is already a member of team %s", username, team.Slug())
continue
}
if err := service.SetMember(cmd.Context(), team.ID, username, true); err != nil {
return err
}
@@ -566,21 +558,7 @@ $ tea team member add 2 bob carol`,
if err != nil {
return err
}
var members []string
for _, username := range args[1:] {
member, err := service.IsMember(cmd.Context(), team.ID, username)
if err != nil {
return err
}
if !member {
a.warn(cmd, "%s is not a member of team %s", username, team.Slug())
continue
}
members = append(members, username)
}
if len(members) == 0 {
return nil
}
members := args[1:]
if err := a.confirmAction(cmd, terminal.Confirmation{
Prompt: fmt.Sprintf("Remove %s from team %s?", joinNames(members), team.Slug()),
NonTTY: fmt.Sprintf("remove %s from team %s", joinNames(members), team.Slug()),
@@ -683,21 +661,7 @@ repositories of other owners cannot be granted to a team.`,
if err != nil {
return err
}
has, err := service.HasRepository(cmd.Context(), team.ID, repo)
if err != nil {
return err
}
switch {
case has && grant:
a.warn(cmd, "Team %s already has access to %s", team.Slug(), repo)
case !has && !grant:
a.warn(cmd, "Team %s has no access to %s", team.Slug(), repo)
default:
repos = append(repos, repo)
}
}
if len(repos) == 0 {
return nil
repos = append(repos, repo)
}
if !grant {
if err := a.confirmAction(cmd, terminal.Confirmation{