From aaf266f2d253419c27b36353b367b0f5e5ffa4fa Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Fri, 27 Nov 2020 16:31:26 +0100 Subject: [PATCH] Update contributors script and update github credits. --- Resources/Credits/GitHub.txt | 2 +- Tools/dump_github_contributors.ps1 | 34 ++++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Resources/Credits/GitHub.txt b/Resources/Credits/GitHub.txt index d5f0dcac2e..85643fa501 100644 --- a/Resources/Credits/GitHub.txt +++ b/Resources/Credits/GitHub.txt @@ -1 +1 @@ -20kdc, 4dplanner, Acruid, actioninja, aeosynth, AJCM-git, ALMv1, AlphaQwerty, ancientpower, as334, avghdev, BGare, bhespiritu, BobdaBiscuit, boiled-water-tsar, Bright0, brndd, CakeQ, CatTheSystem, CC-4477, Centronias, chairbender, clement-or, clusterfack, Clyybber, collinlunn, ComicIronic, creadth, Cyberboss, d34d10cc, DamianX, Daracke, DeanUA, deathrat, Decappi, Dezandor, DrSmugleaf, DTanxxx, dylanstrategie, exp111, F77F, FirinMaLazors, fizzle7, Fouin, gbasood, gituhabu, GlassEclipse, h3half, halworsen, harikattar, Hugal31, ike709, Injazz, InquisitivePenguin, j-giebel, Jackw2As, janekvap, JiimBob, johnku1, juliangiebel, kalanosh, Kmc2000, lajolico, lzimann, Macoron, MemeProof, metalgearsloth, micheel665, Miniwoffer, Moneyl, N3X15, NickPowers43, nuke-makes-games, Nukeuler123, nullarmo, Pangogie, partyaddict, patrikturi, PaulRitter, peptron1, Pireax, PJB3005, ProfanedBane, PrPleGoo, psykzz, Qustinnus, RednoWCirabrab, Rember, RemieRichards, remove32, renodubois, rneuser, Rockdtben, Rohesie, rok-povsic, RomanNovo, SamV522, ScumbagDog, sentient-ai, Serkket, ShadowCommander, SignalWalker, Silvertorch5, SoulSloth, Soundwavesghost, SpaceManiac, spoogemonster, StrawberryMoses, SweptWasTaken, Szunti, tentekal, thatrandomcanadianguy, TheCze, theOperand, tkdrg, Tomeno, Tyler-IN, unusualcrow, UristMcDorf, Visne, volundr-, wixoaGit, YotaXP, zamp, ZelteHonor, ZNixian, Zth--, Zumorica \ No newline at end of file +20kdc, 4dplanner, Acruid, actioninja, aeosynth, AJCM-git, ALMv1, AlphaQwerty, ancientpower, as334, avghdev, BananaFlambe, BGare, bhespiritu, BobdaBiscuit, boiled-water-tsar, Bright0, brndd, CakeQ, CatTheSystem, CC-4477, Centronias, chairbender, clement-or, clusterfack, Clyybber, ColdAutumnRain, collinlunn, ComicIronic, creadth, Cyberboss, d34d10cc, DamianX, Daracke, DeanUA, deathrat, Decappi, Dezandor, DrSmugleaf, DTanxxx, dylanstrategie, exp111, FirinMaLazors, fizzle7, Fouin, gbasood, Git-Nivrak, gituhabu, GlassEclipse, h3half, halworsen, harikattar, Hugal31, ike709, Injazz, InquisitivePenguin, j-giebel, Jackw2As, janekvap, JiimBob, johnku1, juliangiebel, kalanosh, Kmc2000, lajolico, lzimann, Macoron, ManelNavola, Markek1, MemeProof, metalgearsloth, micheel665, Miniwoffer, Moneyl, moonheart08, N3X15, namespace-Memory, NickPowers43, nuke-makes-games, Nukeuler123, nullarmo, Pangogie, partyaddict, patrikturi, PaulRitter, peptron1, Pill-U, Pireax, PJB3005, ProfanedBane, PrPleGoo, psykzz, Qustinnus, RedlineTriad, RednoWCirabrab, Rember, RemieRichards, remove32, renodubois, Rich-Dunne, rneuser, Rockdtben, Rohesie, rok-povsic, RomanNovo, SamV522, ScumbagDog, sentient-ai, Serkket, ShadowCommander, SignalWalker, Silvertorch5, SoulSloth, Soundwavesghost, SpaceManiac, spoogemonster, StrawberryMoses, SweptWasTaken, Szunti, tentekal, thatrandomcanadianguy, TheCze, theOperand, tkdrg, Tomeno, Tyler-IN, unusualcrow, UristMcDorf, Visne, volundr-, wixoaGit, Ygg01, YotaXP, zamp, ZelteHonor, zionnBE, ZNixian, Zth--, Zumorica diff --git a/Tools/dump_github_contributors.ps1 b/Tools/dump_github_contributors.ps1 index 4873eb93ce..9b548282c2 100755 --- a/Tools/dump_github_contributors.ps1 +++ b/Tools/dump_github_contributors.ps1 @@ -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 ", "