diff --git a/Examples/ChangesByExtension.ugit.ps1 b/Examples/ChangesByExtension.ugit.ps1 index 6e49d894..114b37e6 100644 --- a/Examples/ChangesByExtension.ugit.ps1 +++ b/Examples/ChangesByExtension.ugit.ps1 @@ -19,7 +19,9 @@ if ($currentBranchName -eq $headBranch) { } $currentBranchCommits = git log "$($gitRemote.RemoteName)/$headBranch..$CurrentBranch" -Statistics -$changesByExtension = $currentBranchCommits.Changes | Group-Object { ($_.FilePath -split '\.')[-1]} +$changesByExtension = $currentBranchCommits | + Foreach-Object { $_.Changes } | + Group-Object { ($_.FilePath -split '\.')[-1] -replace '\p{P}+$'} if ($env:GITHUB_STEP_SUMMARY) { " @@ -30,8 +32,7 @@ $( foreach ($changeSet in $changesByExtension) { " $($changeSet.Name): $(($changeSet.Group.LinesChanged | Measure-Object -Sum).Sum)" } -) -join [Environment]::NewLine -) +) -join [Environment]::NewLine) ~~~ " |