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