Update contributors scripts to do more stuff
This commit is contained in:
@@ -6,16 +6,22 @@ param(
|
|||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
[DateTime]$since,
|
[DateTime]$since,
|
||||||
|
|
||||||
|
[Nullable[DateTime]]$until,
|
||||||
|
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
[string]$repo);
|
[string]$repo);
|
||||||
|
|
||||||
$r = @()
|
$r = @()
|
||||||
|
|
||||||
$qParams = @{
|
$qParams = @{
|
||||||
"since" = $since.ToString("o")
|
"since" = $since.ToString("o");
|
||||||
"per_page" = 100
|
"per_page" = 100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($until -ne $null) {
|
||||||
|
$qParams["until"] = $until.ToString("o")
|
||||||
|
}
|
||||||
|
|
||||||
$url = "https://api.github.com/repos/{0}/commits" -f $repo
|
$url = "https://api.github.com/repos/{0}/commits" -f $repo
|
||||||
|
|
||||||
while ($null -ne $url)
|
while ($null -ne $url)
|
||||||
|
|||||||
@@ -4,13 +4,28 @@
|
|||||||
|
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
[DateTime]$since);
|
[DateTime]$since,
|
||||||
|
|
||||||
$engine = & "$PSScriptRoot\dump_commits_since.ps1" -repo space-wizards/RobustToolbox -since $since
|
[Nullable[DateTime]]$until);
|
||||||
$content = & "$PSScriptRoot\dump_commits_since.ps1" -repo space-wizards/space-station-14 -since $since
|
|
||||||
|
|
||||||
($content + $engine) `
|
$replacements = @{
|
||||||
|
"moonheart08" = "moony"
|
||||||
|
}
|
||||||
|
|
||||||
|
$ignore = @{
|
||||||
|
"PJBot" = $true
|
||||||
|
}
|
||||||
|
|
||||||
|
$engine = & "$PSScriptRoot\dump_commits_since.ps1" -repo space-wizards/RobustToolbox -since $since -until $until
|
||||||
|
$content = & "$PSScriptRoot\dump_commits_since.ps1" -repo space-wizards/space-station-14 -since $since -until $until
|
||||||
|
|
||||||
|
$contribs = ($content + $engine) `
|
||||||
| Select-Object -ExpandProperty author `
|
| Select-Object -ExpandProperty author `
|
||||||
| Select-Object -ExpandProperty login -Unique `
|
| Select-Object -ExpandProperty login -Unique `
|
||||||
|
| Where-Object { -not $ignore[$_] }
|
||||||
|
| ForEach-Object { $replacements[$_] ?? $_ }
|
||||||
| Sort-Object `
|
| Sort-Object `
|
||||||
| Join-String -Separator ", "
|
| Join-String -Separator ", "
|
||||||
|
|
||||||
|
Write-Host $contribs
|
||||||
|
Write-Host "Total commit count is $($engine.Length + $content.Length)"
|
||||||
Reference in New Issue
Block a user