Skip to content

Commit

Permalink
Merge pull request #45 from boherm/fix-welcoming-himself
Browse files Browse the repository at this point in the history
  • Loading branch information
boherm authored Jun 10, 2024
2 parents e484f5c + b885255 commit 2e2536c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

class WelcomeNewContributorCommandHandler
{
public const EXCLUDED_CONTRIBUTORS = [
'dependabot[bot]',
'ps-jarvis',
];

public function __construct(
private readonly CommitterRepositoryInterface $committerRepository,
private readonly PullRequestRepositoryInterface $prRepository
Expand All @@ -20,7 +25,7 @@ public function __construct(
public function __invoke(WelcomeNewContributorCommand $command): void
{
// We ignore dependabot PRs.
if ('dependabot[bot]' === $command->contributor) {
if (in_array($command->contributor, self::EXCLUDED_CONTRIBUTORS)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ public static function provideTestHandle(): array
true,
false,
],
[
new PullRequestId(
repositoryOwner: 'PrestaShop',
repositoryName: 'PrestaShop',
pullRequestNumber: 'pullRequestNumber'
),
'ps-jarvis',
true,
false,
],
];
}
}

0 comments on commit 2e2536c

Please sign in to comment.