1313class ReadCommand extends Command
1414{
1515 protected $ signature = 'read '
16- . ' {repository? : Full or partial repository name } '
16+ . ' {repository?* : Full or partial repository names } '
1717 . ' {--i|without-issues : Exclude issues from processing} '
1818 . ' {--s|without-pulls : Exclude Pull Requests from processing} '
1919 . ' {--o|with-open : Process including open Issues and Pull Requests} '
@@ -23,42 +23,49 @@ class ReadCommand extends Command
2323
2424 public function handle (): void
2525 {
26- $ repository = $ this ->repository ();
26+ $ repositories = $ this ->repositories ();
2727
28- $ this ->welcome ($ repository );
28+ $ this ->welcome ($ repositories );
2929
3030 if ($ this ->hasContinue ()) {
31- $ this ->read ($ repository );
31+ $ this ->read ($ repositories );
3232 }
3333 }
3434
35- protected function welcome (? string $ repository ): void
35+ protected function welcome (array $ repositories ): void
3636 {
37- $ this ->show ($ repository ?: 'All Notifications ' );
37+ if ($ repositories ) {
38+ $ this ->components ->info ('You specified the following repository name masks: ' );
39+ $ this ->components ->bulletList ($ repositories );
40+
41+ return ;
42+ }
43+
44+ $ this ->components ->info ('All Notifications ' );
3845 }
3946
4047 protected function hasContinue (): bool
4148 {
4249 return confirm ('Continue ' );
4350 }
4451
45- protected function read (? string $ repository ): void
52+ protected function read (array $ repositories ): void
4653 {
4754 $ this ->gitHub ()
48- ->repository ( $ repository )
55+ ->repositories ( $ repositories )
4956 ->withoutIssues ($ this ->withoutIssues ())
5057 ->withoutPulls ($ this ->withoutPulls ())
5158 ->withOpen ($ this ->withOpen ())
5259 ->when (
53- $ this ->shouldBeAll ($ repository ),
60+ $ this ->shouldBeAll ($ repositories ),
5461 fn (GitHub $ gitHub ) => $ gitHub ->markAll (),
5562 fn (GitHub $ gitHub ) => $ gitHub ->mark ()
5663 );
5764 }
5865
59- protected function shouldBeAll (? string $ repository ): bool
66+ protected function shouldBeAll (array $ repositories ): bool
6067 {
61- return empty ($ repository )
68+ return empty ($ repositories )
6269 && ! $ this ->withoutIssues ()
6370 && ! $ this ->withoutPulls ()
6471 && $ this ->withOpen ();
@@ -75,14 +82,13 @@ protected function gitHub(): GitHub
7582 ]);
7683 }
7784
78- public function show (string $ value ): void
79- {
80- $ this ->components ->info ($ value );
81- }
82-
83- protected function repository (): ?string
85+ protected function repositories (): array
8486 {
85- return $ this ->argument ('repository ' );
87+ return collect ($ this ->argument ('repository ' ))
88+ ->filter ()
89+ ->unique ()
90+ ->sort ()
91+ ->all ();
8692 }
8793
8894 protected function withoutIssues (): bool
0 commit comments