Add milestones subcomands #149
|
@ -196,11 +196,14 @@ func runLoginAddMain(name, token, user, passwd, sshKey, giteaURL string, insecur
|
|||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
}}
|
||||
}
|
||||
client, _ := gitea.NewClient(giteaURL,
|
||||
client, err := gitea.NewClient(giteaURL,
|
||||
gitea.SetToken(token),
|
||||
gitea.SetBasicAuth(user, passwd),
|
||||
gitea.SetHTTPClient(httpClient),
|
||||
)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
u, _, err := client.GetMyUserInfo()
|
||||
if err != nil {
|
||||
|
|
|
@ -29,6 +29,11 @@ var CmdNotifications = cli.Command{
|
|||
Aliases: []string{"rd"},
|
||||
Usage: "show read notifications instead unread",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "pinned",
|
||||
Aliases: []string{"pd"},
|
||||
Usage: "show pinned notifications instead unread",
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "page",
|
||||
Aliases: []string{"p"},
|
||||
|
@ -56,6 +61,9 @@ func runNotifications(ctx *cli.Context) error {
|
|||
if ctx.Bool("read") {
|
||||
status = []gitea.NotifyStatus{gitea.NotifyStatusRead}
|
||||
}
|
||||
if ctx.Bool("pinned") {
|
||||
status = append(status, gitea.NotifyStatusPinned)
|
||||
}
|
||||
|
||||
if ctx.Bool("all") {
|
||||
login := initCommandLoginOnly()
|
||||
|
|
Loading…
Reference in New Issue
Block a user