mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-10-31 01:05:26 +01: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:
		| @@ -97,10 +97,11 @@ func runIssuesList(ctx *cli.Context) error { | ||||
|  | ||||
| 	headers := []string{ | ||||
| 		"Index", | ||||
| 		"Title", | ||||
| 		"State", | ||||
| 		"Author", | ||||
| 		"Milestone", | ||||
| 		"Updated", | ||||
| 		"Title", | ||||
| 	} | ||||
|  | ||||
| 	var values [][]string | ||||
| @@ -111,18 +112,23 @@ func runIssuesList(ctx *cli.Context) error { | ||||
| 	} | ||||
|  | ||||
| 	for _, issue := range issues { | ||||
| 		name := issue.Poster.FullName | ||||
| 		if len(name) == 0 { | ||||
| 			name = issue.Poster.UserName | ||||
| 		author := issue.Poster.FullName | ||||
| 		if len(author) == 0 { | ||||
| 			author = issue.Poster.UserName | ||||
| 		} | ||||
| 		mile := "" | ||||
| 		if issue.Milestone != nil { | ||||
| 			mile = issue.Milestone.Title | ||||
| 		} | ||||
| 		values = append( | ||||
| 			values, | ||||
| 			[]string{ | ||||
| 				strconv.FormatInt(issue.Index, 10), | ||||
| 				string(issue.State), | ||||
| 				name, | ||||
| 				issue.Updated.Format("2006-01-02 15:04:05"), | ||||
| 				issue.Title, | ||||
| 				string(issue.State), | ||||
| 				author, | ||||
| 				mile, | ||||
| 				issue.Updated.Format("2006-01-02 15:04:05"), | ||||
| 			}, | ||||
| 		) | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 6543
					6543