mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
refactor(app): name the feedback label helper refLabel
The reference parser uses issueRef as a reference kind. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -363,7 +363,7 @@ func TestMutationFeedback(t *testing.T) {
|
||||
deps.Streams.OutTTY = tc.tty
|
||||
deps.Getenv = envFunc(map[string]string{"NO_COLOR": "1"})
|
||||
a, cmd := outputApplication(deps, tc.json)
|
||||
ref := issueRef("alice/x", 12, "Fix\x1b[2J login")
|
||||
ref := refLabel("alice/x", 12, "Fix\x1b[2J login")
|
||||
a.done(cmd, "Created issue %s", ref)
|
||||
a.warn(cmd, "Issue %s is already closed", ref)
|
||||
require.NoError(t, a.printURL(cmd, "https://example.org/12"))
|
||||
@@ -387,7 +387,7 @@ func TestBatchDoneReportsEachSuccess(t *testing.T) {
|
||||
return listed{Number: n, Title: fmt.Sprintf("Issue %d", n)}, nil
|
||||
}
|
||||
label := func(n int64) string { return fmt.Sprintf("#%d", n) }
|
||||
report := func(item listed) string { return "Closed issue " + issueRef("alice/x", item.Number, item.Title) }
|
||||
report := func(item listed) string { return "Closed issue " + refLabel("alice/x", item.Number, item.Title) }
|
||||
for _, tc := range []struct {
|
||||
name, json, out, stderr string
|
||||
tty bool
|
||||
|
||||
Reference in new issue
Block a user