Adding progress bar to milestone report and outfile so you can watch the progress bar easier and still manipulate w/ grep after (#46354)

This commit is contained in:
George Karr
2026-05-28 12:46:16 -05:00
committed by GitHub
parent d8c6f96033
commit 887dcf363f
4 changed files with 145 additions and 23 deletions
+7 -2
View File
@@ -124,9 +124,14 @@ func GetIssueProjects(issueNumber int) (map[int]string, error) {
}
// GetProjectsForIssues gathers the union of projects across the provided issues.
func GetProjectsForIssues(issueNumbers []int) ([]ProjectInfo, error) {
// If progress is non-nil it is called once per issue (1-based current, total,
// issue number) so callers can render progress for this per-issue fetch.
func GetProjectsForIssues(issueNumbers []int, progress func(current, total, issueNumber int)) ([]ProjectInfo, error) {
seen := make(map[int]string)
for _, num := range issueNumbers {
for i, num := range issueNumbers {
if progress != nil {
progress(i+1, len(issueNumbers), num)
}
prjs, err := GetIssueProjects(num)
if err != nil {
// tolerate errors per-issue, continue accumulating from others