Created
May 18, 2023 16:33
-
-
Save zadjii-msft/2ee3926811e83593c76fde17bb76073e to your computer and use it in GitHub Desktop.
Make a graph of terminal PRs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$prs=Get-GitHubPullRequest -RepositoryName terminal -owner Microsoft -State closed | |
$wtprs=$prs | ? { $_.merged_at -ne $null -and $_.merged_at -gt ([datetime]"May 1, 2019") } | |
$wtprs | group { "{0}-{1}" -f ($_.created_at.year, $_.created_at.month) } | |
function was-microsoft($_) { $_.user.Login -In @("leonMSFT", "cinnamon-msft", "PankajBhojwani", "miniksa", "DHowett-MSFT", "carlos-zamora", "lhecker", "DHowett", "zadjii-msft") } | |
# Make a cool proportional graph of merged PRs | |
" COMM TEAM"; $wtprs | group { "{0}-{1:D2}" -f ($_.created_at.year, $_.created_at.month) } | % { $ms = ($_.Group | ? { was-microsoft $_ } | measure | select -expand Count); $tot=$_.Group | measure | select -expand count; $msv = [int](($ms/$tot)*15); $nmsv = 15-$msv; "`e[1m{0}`e[m `e[44m{1}`e[42m{2}`e[m" -f ($_.Name, (" " * [int]$nmsv), (" " * [int]$msv)) } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment