aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bug
diff options
context:
space:
mode:
authorSteve Moyer <smoyer1@selesy.com>2023-01-20 09:02:05 -0500
committerSteve Moyer <smoyer1@selesy.com>2023-01-20 09:02:05 -0500
commit3f764397dbd49910e549d3ef3c0d26e3ca2f8b0f (patch)
tree8a503d8e7369b9b037c8f070004dd37500c7d4d8 /commands/bug
parent14773b16ca4a16cbf84416894e254e41a01764b1 (diff)
downloadgit-bug-3f764397dbd49910e549d3ef3c0d26e3ca2f8b0f.tar.gz
docs(commands): try to make cleaned argument use more obvious
Diffstat (limited to 'commands/bug')
-rw-r--r--commands/bug/bug_comment_test.go1
-rw-r--r--commands/bug/bug_label_new.go4
-rw-r--r--commands/bug/bug_label_rm.go4
3 files changed, 6 insertions, 3 deletions
diff --git a/commands/bug/bug_comment_test.go b/commands/bug/bug_comment_test.go
index ecc1c5f6..add48b21 100644
--- a/commands/bug/bug_comment_test.go
+++ b/commands/bug/bug_comment_test.go
@@ -140,7 +140,6 @@ func requireCommentsEqual(t *testing.T, golden string, env *execenv.Env) {
comments = normalizeParsedComments(t, comments)
if *cmdtest.Update {
- t.Log("Got here")
for i, comment := range comments {
fileName := fmt.Sprintf(goldenFilePattern, golden, i)
require.NoError(t, os.WriteFile(fileName, []byte(comment.message), 0644))
diff --git a/commands/bug/bug_label_new.go b/commands/bug/bug_label_new.go
index c8c3b811..9fff851c 100644
--- a/commands/bug/bug_label_new.go
+++ b/commands/bug/bug_label_new.go
@@ -22,11 +22,13 @@ func newBugLabelNewCommand(env *execenv.Env) *cobra.Command {
}
func runBugLabelNew(env *execenv.Env, args []string) error {
- b, added, err := ResolveSelected(env.Backend, args)
+ b, cleanArgs, err := ResolveSelected(env.Backend, args)
if err != nil {
return err
}
+ added := cleanArgs
+
changes, _, err := b.ChangeLabels(text.CleanupOneLineArray(added), nil)
for _, change := range changes {
diff --git a/commands/bug/bug_label_rm.go b/commands/bug/bug_label_rm.go
index fca2ac46..d389830f 100644
--- a/commands/bug/bug_label_rm.go
+++ b/commands/bug/bug_label_rm.go
@@ -22,11 +22,13 @@ func newBugLabelRmCommand(env *execenv.Env) *cobra.Command {
}
func runBugLabelRm(env *execenv.Env, args []string) error {
- b, removed, err := ResolveSelected(env.Backend, args)
+ b, cleanArgs, err := ResolveSelected(env.Backend, args)
if err != nil {
return err
}
+ removed := cleanArgs
+
changes, _, err := b.ChangeLabels(nil, text.CleanupOneLineArray(removed))
for _, change := range changes {