Add milestones subcomands #149

Merged
6543 merged 18 commits from 6543/tea:feat_milestones into master 2020-09-17 19:35:25 +00:00
2 changed files with 12 additions and 1 deletions
Showing only changes of commit 28a95372a0 - Show all commits

View File

@ -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 {

View File

@ -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()