mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
feat(label): address labels by name and add import and clone
label edit bug and label delete kind/feature failed with "invalid resource number", and label create took its name as --name and required --color. Like gh, label create takes the name as an argument and picks a random color without -c; label edit and delete take names or IDs (delete several at once, after a confirmation that names them), and -c/-d/-n/-f are the gh short flags. Without a name on a terminal, label create asks for the name, color and description. label list shows ID NAME COLOR DESCRIPTION FLAGS with a colored swatch and exclusive and archived labels flagged. Mutations report ✓ lines. label import reads a label file or stdin (label create --file still works), label clone copies another repository's labels, skipping those that exist unless --force, and label export writes to stdout by default or to -O/--output. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
10 files changed
+583
-194
No files matched your search
@@ -265,7 +265,7 @@ func TestCommandHelpShowsRelevantFlagsOnly(t *testing.T) {
|
||||
}
|
||||
out.Reset()
|
||||
require.NoError(t, Execute(context.Background(), deps, []string{"label", "list", "--help"}))
|
||||
require.Contains(t, out.String(), "\nFLAGS\n -L, --limit int Maximum number of results (1..1000) (default 30)\n --org string ")
|
||||
require.Contains(t, out.String(), "\nFLAGS\n -L, --limit int Maximum number of results (1..1000) (default 30)\n --org organization ")
|
||||
for _, args := range [][]string{{"version", "--help"}, {"alias", "list", "--help"}, {"auth", "status", "--help"}} {
|
||||
out.Reset()
|
||||
require.NoError(t, Execute(context.Background(), deps, args))
|
||||
@@ -424,11 +424,6 @@ const (
|
||||
issue attachment list
|
||||
issue attachment upload
|
||||
issue attachment view
|
||||
label create
|
||||
label delete
|
||||
label edit
|
||||
label export
|
||||
label list
|
||||
milestone close
|
||||
milestone create
|
||||
milestone delete
|
||||
@@ -454,7 +449,6 @@ const (
|
||||
`
|
||||
longsToWrite = `
|
||||
issue attachment
|
||||
label
|
||||
milestone
|
||||
milestone issue
|
||||
pr attachment
|
||||
|
||||
Reference in new issue
Block a user