mirror of
https://gitea.com/gitea/tea
synced 2024-10-31 21:20:23 +00:00
enforce argument to tea ms issues
(#297)
enforce argument to `tea ms issues` enforce two arguments CI.restart() CI.restart() CI.restart() CI.restart() Co-authored-by: Norwin Roosen <git@nroo.de> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/297 Reviewed-by: khmarbaise <khmarbaise@noreply.gitea.io> Reviewed-by: 6543 <6543@obermui.de> Co-Authored-By: Norwin <noerw@noreply.gitea.io> Co-Committed-By: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
parent
5a41c79d7d
commit
b10d792687
@ -85,7 +85,9 @@ func runMilestoneIssueList(ctx *cli.Context) error {
|
||||
kind = gitea.IssueTypePull
|
||||
}
|
||||
|
||||
fmt.Println(state)
|
||||
if ctx.Args().Len() != 1 {
|
||||
return fmt.Errorf("Must specify milestone name")
|
||||
}
|
||||
|
||||
milestone := ctx.Args().First()
|
||||
// make sure milestone exist
|
||||
@ -111,7 +113,7 @@ func runMilestoneIssueList(ctx *cli.Context) error {
|
||||
func runMilestoneIssueAdd(ctx *cli.Context) error {
|
||||
login, owner, repo := config.InitCommand(flags.GlobalRepoValue, flags.GlobalLoginValue, flags.GlobalRemoteValue)
|
||||
client := login.Client()
|
||||
if ctx.Args().Len() == 0 {
|
||||
if ctx.Args().Len() != 2 {
|
||||
return fmt.Errorf("need two arguments")
|
||||
}
|
||||
|
||||
@ -137,7 +139,7 @@ func runMilestoneIssueAdd(ctx *cli.Context) error {
|
||||
func runMilestoneIssueRemove(ctx *cli.Context) error {
|
||||
login, owner, repo := config.InitCommand(flags.GlobalRepoValue, flags.GlobalLoginValue, flags.GlobalRemoteValue)
|
||||
client := login.Client()
|
||||
if ctx.Args().Len() == 0 {
|
||||
if ctx.Args().Len() != 2 {
|
||||
return fmt.Errorf("need two arguments")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user