Update contributors script and update github credits.
This commit is contained in:
@@ -4,17 +4,37 @@
|
||||
$engineJson = (Invoke-WebRequest "https://api.github.com/repos/space-wizards/RobustToolbox/contributors?per_page=100").Content | convertfrom-json
|
||||
$contentJson = (Invoke-WebRequest "https://api.github.com/repos/space-wizards/space-station-14/contributors?per_page=100").Content | convertfrom-json
|
||||
|
||||
if ($engineJson.Count -ge 100)
|
||||
function load_contribs([string] $repo)
|
||||
{
|
||||
Write-Warning "Engine is reporting 100 contributors. It might not be a complete list due to API pagination!"
|
||||
$qParams = @{
|
||||
"per_page" = 100
|
||||
}
|
||||
|
||||
$url = "https://api.github.com/repos/{0}/contributors" -f $repo
|
||||
|
||||
$r = @()
|
||||
|
||||
while ($null -ne $url)
|
||||
{
|
||||
$resp = Invoke-WebRequest $url -Body $qParams
|
||||
|
||||
$url = $resp.RelationLink.next
|
||||
|
||||
$j = ConvertFrom-Json $resp.Content
|
||||
$r += $j
|
||||
}
|
||||
|
||||
return $r
|
||||
}
|
||||
|
||||
if ($contentJson.Count -ge 100)
|
||||
{
|
||||
Write-Warning "Content is reporting 100 contributors. It might not be a complete list due to API pagination!"
|
||||
}
|
||||
$engineJson = load_contribs("space-wizards/RobustToolbox")
|
||||
$contentJson = load_contribs("space-wizards/space-station-14")
|
||||
|
||||
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
|
||||
$bad = get-content $(join-path $scriptDir "ignored_github_contributors.txt")
|
||||
|
||||
($engineJson).login + ($contentJson).login | select -unique | where { $bad -notcontains $_ } | Sort-object | Join-String -Separator ", "
|
||||
($engineJson).login + ($contentJson).login `
|
||||
| select -unique `
|
||||
| where { $bad -notcontains $_ } `
|
||||
| Sort-object `
|
||||
| Join-String -Separator ", "
|
||||
|
||||
Reference in New Issue
Block a user