Adding assignee count to help eyeball what needs assistance during qa (#45960)
This commit is contained in:
@@ -157,8 +157,9 @@ var milestoneReportCmd = &cobra.Command{
|
||||
projects = filtered
|
||||
}
|
||||
}
|
||||
headers := make([]string, 0, len(projects)+2)
|
||||
headers := make([]string, 0, len(projects)+3)
|
||||
headers = append(headers, "Number")
|
||||
headers = append(headers, "Assignees")
|
||||
for _, p := range projects {
|
||||
if p.Title != "" {
|
||||
title := p.Title
|
||||
@@ -211,7 +212,7 @@ var milestoneReportCmd = &cobra.Command{
|
||||
pids = append(pids, p.ID)
|
||||
}
|
||||
statuses, _ := ghapi.GetIssueProjectStatuses(num, pids)
|
||||
row := []string{fmt.Sprintf("%d", num)}
|
||||
row := []string{fmt.Sprintf("%d", num), fmt.Sprintf("%d", len(mi.Assignees))}
|
||||
for _, pid := range pids {
|
||||
ps, ok := statuses[pid]
|
||||
if !ok || !ps.Present {
|
||||
|
||||
@@ -43,7 +43,7 @@ func GetIssuesByMilestoneWithTitles(name string, limit int) ([]MilestoneIssue, e
|
||||
if limit <= 0 {
|
||||
limit = 1000
|
||||
}
|
||||
cmd := fmt.Sprintf("gh issue list --state all --milestone %q --limit %d --json number,title,labels", name, limit)
|
||||
cmd := fmt.Sprintf("gh issue list --state all --milestone %q --limit %d --json number,title,labels,assignees", name, limit)
|
||||
out, err := RunCommandAndReturnOutput(cmd)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -68,6 +68,9 @@ type MilestoneIssue struct {
|
||||
Labels []struct {
|
||||
Name string `json:"name"`
|
||||
} `json:"labels"`
|
||||
Assignees []struct {
|
||||
Login string `json:"login"`
|
||||
} `json:"assignees"`
|
||||
}
|
||||
|
||||
// GetIssueProjects returns projects (id->title) that a specific issue belongs to.
|
||||
|
||||
Reference in New Issue
Block a user