fix: tighten error classification and pull request selection

Only Gitea's archived-repository messages mean the repository is archived,
so an archived label is no longer reported as one. Refused POSTs to the
organization, team, user and SSH key collections name the resource they would
have created, and the existing pull request is looked up with escaped branch
names.

pullSelector without an argument refuses an explicit --repo, like gh: the
checked-out branch says nothing about another repository.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-11 22:48:50 +02:00
1 parent dc43272085
commit 71189fd15f
7 files changed
+41 -23

No files matched your search

+4 -3
View File
@@ -295,10 +295,11 @@ func argumentName(cmd *cobra.Command, argument string) string {
if group == cmd {
return text
}
if noun := group.Name(); noun == "pr" {
return "pull request " + text
noun := group.Name()
if noun == "pr" {
noun = "pull request"
}
return group.Name() + " " + text
return noun + " " + text
}
// localFlagsChanged reports whether any command-specific flag was supplied.