Powershell scripts to dump commit and contributor lists.
This commit is contained in:
31
Tools/dump_commits_since.ps1
Executable file
31
Tools/dump_commits_since.ps1
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
[cmdletbinding()]
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[DateTime]$since,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$repo);
|
||||
|
||||
$r = @()
|
||||
|
||||
$qParams = @{
|
||||
"since" = $since.ToString("o")
|
||||
"per_page" = 100
|
||||
}
|
||||
|
||||
$url = "https://api.github.com/repos/{0}/commits" -f $repo
|
||||
|
||||
while ($null -ne $url)
|
||||
{
|
||||
$resp = Invoke-WebRequest $url -Body $qParams
|
||||
|
||||
$url = $resp.RelationLink.next
|
||||
|
||||
$j = ConvertFrom-Json $resp.Content
|
||||
$r += $j
|
||||
}
|
||||
|
||||
return $r
|
||||
16
Tools/dump_contributors_since.ps1
Normal file
16
Tools/dump_contributors_since.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
[cmdletbinding()]
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[DateTime]$since);
|
||||
|
||||
$engine = & "$PSScriptRoot\dump_commits_since.ps1" -repo space-wizards/RobustToolbox -since $since
|
||||
$content = & "$PSScriptRoot\dump_commits_since.ps1" -repo space-wizards/space-station-14 -since $since
|
||||
|
||||
($content + $engine) `
|
||||
| Select-Object -ExpandProperty author `
|
||||
| Select-Object -ExpandProperty login -Unique `
|
||||
| Sort-Object `
|
||||
| Join-String -Separator ", "
|
||||
Reference in New Issue
Block a user