Unify ignore/replacement lists for the two contrib ps1 scripts.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
# TODO: This is definitely gonna stop being accurate when we get above 100 contributors on one of the repos.
|
||||
$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
|
||||
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
|
||||
. $(join-path $scriptDir contribs_shared.ps1)
|
||||
|
||||
function load_contribs([string] $repo)
|
||||
{
|
||||
@@ -30,11 +29,9 @@ function load_contribs([string] $repo)
|
||||
$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 $_ } `
|
||||
| Where-Object { -not $ignore[$_] }`
|
||||
| ForEach-Object { if($replacements[$_] -eq $null){ $_ } else { $replacements[$_] }} `
|
||||
| Sort-object `
|
||||
| Join-String -Separator ", "
|
||||
|
||||
Reference in New Issue
Block a user