refactor(services): leave CLI flag and command names to the app layer

Services report ErrRunScanExhausted, ErrMaxPages and plain conflicts,
and the commands add the --branch/--max-pages/--force hints. Unknown
label names use the shared NotFoundError, and the repository-scoped
review and team search refusal moves into tea search's own usage
check.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 18:44:29 +02:00
1 parent f2f1dd1e34
commit af14803b3a
10 files changed
+37 -18

No files matched your search

+2 -2
View File
@@ -36,7 +36,7 @@ func TestLabelSelectionReadsCappedPagesAndPreservesOrder(t *testing.T) {
require.Equal(t, []int64{2, 1}, ids)
require.Equal(t, 3, reads)
_, err = service.ResolveIssueNames(context.Background(), []string{"missing"})
require.ErrorContains(t, err, "does not exist")
require.ErrorContains(t, err, "not found")
before := reads
_, err = service.ResolveIssueNames(context.Background(), []string{" "})
require.ErrorContains(t, err, "cannot be empty")
@@ -89,5 +89,5 @@ func TestScopedLabelNamesDoNotCollideWithLiteralPrefixes(t *testing.T) {
require.NoError(t, err)
require.Equal(t, []int64{1, 2, 3}, ids)
_, err = service.ResolveIssueNames(context.Background(), []string{"org:bug"})
require.ErrorContains(t, err, "does not exist")
require.ErrorContains(t, err, "not found")
}