mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-27 03:21: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
@@ -56,8 +56,8 @@ repository with --repo. Words of the query match titles and bodies.`, nouns), Ex
|
||||
if opts.Team != "" && opts.Owner == "" {
|
||||
return clierr.Wrap(clierr.Usage, errors.New("--team requires --owner"))
|
||||
}
|
||||
if opts.Team != "" && target.Repo != "" {
|
||||
return clierr.Wrap(clierr.Usage, errors.New("--team requires instance-wide search; omit --repo or TEA_REPO"))
|
||||
if (opts.Team != "" || opts.ReviewRequested || opts.Reviewed) && target.Repo != "" {
|
||||
return clierr.Wrap(clierr.Usage, errors.New("--team, --review-requested and --reviewed require instance-wide search; omit --repo or TEA_REPO"))
|
||||
}
|
||||
opts.Author = target.expandMe(opts.Author)
|
||||
if target.Repo != "" {
|
||||
|
||||
Reference in new issue
Block a user