Skip to content

Commit f6bf3e9

Browse files
digitalinfinityatbagga
authored andcommitted
Update PRReportGeneration.ps1 (#773)
The datetime parsing logic interprets the month as minutes instead and so the parsed datetime is incorrect causing the loop to exit prematurely. Small fix to interpret as month instead.
1 parent 21c4a9a commit f6bf3e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/PRReportGeneration.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ while($continueFetching)
2828
{
2929
$prClosedDateInString = $pr | Select-Object -ExpandProperty closedDate
3030
Write-Host -NoNewline "."
31-
$prClosedData = [datetime]::ParseExact($prClosedDateInString.SubString(0,10),'yyyy-mm-dd', $null)
31+
$prClosedData = [datetime]::ParseExact($prClosedDateInString.SubString(0,10),'yyyy-MM-dd', $null)
3232
$prId = $pr | Select-Object -ExpandProperty pullRequestId
3333

3434
$prDetails = az repos pr show --org $org --id $prId -o json | ConvertFrom-Json
@@ -57,4 +57,4 @@ Write-Host "."
5757
Write-Host "ByPassed PR count $($bypassedCount)"
5858
Write-Host "Non ByPassed PR count $($nonByPassedCount)"
5959
Write-Host "ByPassed PR details"
60-
Write-Host $bypassPRsInfo
60+
Write-Host $bypassPRsInfo

0 commit comments

Comments
 (0)