Skip to content

Commit

Permalink
Added check to ignore GH bot, updated user URL
Browse files Browse the repository at this point in the history
  • Loading branch information
erikaheidi committed Dec 18, 2021
1 parent 4891b6d commit 7bfd006
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions minicli
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ use Minicli\Curly\Client;
$app = new App([
'app_path' => __DIR__ . '/app/Command',
'repository' => getenv('CONTRIB_REPOSITORY') ?: 'minicli/minicli',
'output_file' => getenv('CONTRIB_OUTPUT_FILE') ?: 'CONTRIBUTORS.md'
'output_file' => getenv('CONTRIB_OUTPUT_FILE') ?: 'CONTRIBUTORS.md',
'ignore_users' => [ 'github-actions[bot]' ]
]);

$app->registerCommand('update-contributors', function () use ($app) {
Expand All @@ -34,7 +35,9 @@ $app->registerCommand('update-contributors', function () use ($app) {
$content .= "Shout out to our top contributors!\n\n";

foreach (json_decode($response['body']) as $item) {
$content .= "- [$item->login]($item->url)\n";
if (!in_array($item->login, $app->config->ignore_users)) {
$content .= "- [$item->login]($item->html_url)\n";
}
}

try {
Expand Down

0 comments on commit 7bfd006

Please sign in to comment.