mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
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:
10 files changed
+37
-18
No files matched your search
@@ -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")
|
||||
}
|
||||
Reference in new issue
Block a user