Skip to content

Commit 5bde32b

Browse files
Ignore bot accounts in wp maintenance contrib-list (#55)
* Ignore bot accounts in `contrib-list` * Fix PHPCS issues --------- Co-authored-by: Daniel Bachhuber <[email protected]>
1 parent 049cede commit 5bde32b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.maintenance/src/Contrib_List_Command.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ final class Contrib_List_Command {
3333
* @when before_wp_load
3434
*/
3535
public function __invoke( $args, $assoc_args ) {
36+
$repos = null;
37+
$use_bundle = false;
3638

37-
$repos = null;
38-
$milestone_names = null;
39-
$use_bundle = false;
39+
$ignored_contributors = [
40+
'github-actions[bot]',
41+
];
4042

4143
if ( count( $args ) > 0 ) {
4244
$repos = [ array_shift( $args ) ];
@@ -196,6 +198,8 @@ function ( $a, $b ) {
196198
}
197199
}
198200

201+
$contributors = array_diff( $contributors, $ignored_contributors );
202+
199203
WP_CLI::log( 'Total contributors: ' . count( $contributors ) );
200204
WP_CLI::log( 'Total pull requests: ' . $pull_request_count );
201205

0 commit comments

Comments
 (0)