refactor(issue,pr): trim help, restating comments and single-use helpers

Cut issue, pr, label, milestone and comment examples to at most three, drop
doc comments that only restate the name, fold the comment and attachment
argument lookups into one closure each, and inline label helpers with one
caller.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 20:48:00 +02:00
1 parent 4a85bb3d40
commit 2826726557
13 files changed
+57 -147

No files matched your search

-2
View File
@@ -71,7 +71,6 @@ func (a *application) addPullMutations(group *cobra.Command) {
group.AddCommand(a.pullCreateCommand(), a.pullStateCommand(true), a.pullStateCommand(false), a.pullDiffCommand(), a.pullReviewCommand(), a.pullMergeCommand())
}
// pullStateCommand builds tea pr close, or tea pr reopen when closing is false.
func (a *application) pullStateCommand(closing bool) *cobra.Command {
verb, done, state := "reopen", "Reopened", "open"
if closing {
@@ -252,7 +251,6 @@ var mergeVerbs = map[string]string{
"merge": "Merged", "rebase": "Rebased and merged", "rebase-merge": "Rebased and merged", "squash": "Squashed and merged", "fast-forward-only": "Merged",
}
// mergeMethods are the merge styles in Gitea's order.
var mergeMethods = []string{"merge", "rebase", "rebase-merge", "squash", "fast-forward-only"}
func (a *application) pullMergeCommand() *cobra.Command {