File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ if ($PSCmdlet.ParameterSetName -eq 'RepositoryFile') {
45
45
}
46
46
47
47
$date = $StartDate
48
- $milestones = do {
48
+ [ pscustomobject []] $milestones = do {
49
49
# Start with the first of the month at 23:59 UTC.
50
50
$date = [DateTimeOffset ]::Parse(" $ ( $date.ToString (' yyyy-MM' )) -01T23:59:59Z" )
51
51
@@ -68,8 +68,13 @@ if (!$milestones) {
68
68
return
69
69
}
70
70
71
+ $completed = 0
72
+ $total = $Repositories.Length * $milestones.Length
73
+ Write-Progress - Activity ($activity = ' Creating milestones' ) - PercentComplete 0
74
+
71
75
foreach ($repo in $Repositories ) {
72
76
foreach ($m in $milestones ) {
77
+ Write-Progress - Activity $activity - Status " In $repo " - CurrentOperation " Milestone $ ( $m.Title ) " - PercentComplete ($completed / $total * 100 )
73
78
if ($Force -or $PSCmdlet.ShouldProcess (
74
79
" Creating milestone $ ( $m.Title ) ending $ ( $m.DueOn ) in $repo " ,
75
80
" Create milestone $ ( $m.Title ) ending $ ( $m.DueOn ) in $repo ?" ,
@@ -85,8 +90,10 @@ foreach ($repo in $Repositories) {
85
90
Write-Verbose " Created $ ( $result.url ) for milestone $ ( $m.Title ) in $repo "
86
91
}
87
92
}
93
+ $completed ++
88
94
}
89
95
}
96
+ Write-Progress - Activity $activity - Completed
90
97
91
98
<#
92
99
. SYNOPSIS
You can’t perform that action at this time.
0 commit comments