added global appendable Flags (#12) (#39)

This commit is contained in:
root360-AndreasUlm
2019-10-23 15:58:18 +00:00
committed by techknowlogick
parent bbcc689b93
commit 7df0354d6c
5 changed files with 116 additions and 98 deletions

View File

@@ -21,25 +21,11 @@ var CmdPulls = cli.Command{
Usage: "Operate with pulls of the repository",
Description: `Operate with pulls of the repository`,
Action: runPulls,
Flags: []cli.Flag{
cli.StringFlag{
Name: "login, l",
Usage: "Indicate one login, optional when inside a gitea repository",
},
cli.StringFlag{
Name: "repo, r",
Usage: "Indicate one repository, optional when inside a gitea repository",
},
cli.StringFlag{
Name: "output, o",
Usage: outputUsage,
Destination: &output,
},
},
Flags: AllDefaultFlags,
}
func runPulls(ctx *cli.Context) error {
login, owner, repo := initCommand(ctx)
login, owner, repo := initCommand()
prs, err := login.Client().ListRepoPullRequests(owner, repo, gitea.ListPullRequestsOptions{
Page: 0,