mirror of
https://gitea.com/gitea/tea.git
synced 2025-10-12 00:45:32 +02:00
Add milestones subcomand (#149)
issues/pulls show milestones add mile issues subsubcomand Add milestones subcomand Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/149 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
20
cmd/pulls.go
20
cmd/pulls.go
@@ -62,10 +62,11 @@ func runPulls(ctx *cli.Context) error {
|
||||
|
||||
headers := []string{
|
||||
"Index",
|
||||
"Title",
|
||||
"State",
|
||||
"Author",
|
||||
"Milestone",
|
||||
"Updated",
|
||||
"Title",
|
||||
}
|
||||
|
||||
var values [][]string
|
||||
@@ -79,18 +80,23 @@ func runPulls(ctx *cli.Context) error {
|
||||
if pr == nil {
|
||||
continue
|
||||
}
|
||||
name := pr.Poster.FullName
|
||||
if len(name) == 0 {
|
||||
name = pr.Poster.UserName
|
||||
author := pr.Poster.FullName
|
||||
if len(author) == 0 {
|
||||
author = pr.Poster.UserName
|
||||
}
|
||||
mile := ""
|
||||
if pr.Milestone != nil {
|
||||
mile = pr.Milestone.Title
|
||||
}
|
||||
values = append(
|
||||
values,
|
||||
[]string{
|
||||
strconv.FormatInt(pr.Index, 10),
|
||||
string(pr.State),
|
||||
name,
|
||||
pr.Updated.Format("2006-01-02 15:04:05"),
|
||||
pr.Title,
|
||||
string(pr.State),
|
||||
author,
|
||||
mile,
|
||||
pr.Updated.Format("2006-01-02 15:04:05"),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user