Skip to content

Commit 20a178d

Browse files
Merge pull request #74 from TheDragonCode/1.x
The `without-*` options was renamed to `except-*`
2 parents e416610 + 382bdcb commit 20a178d

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ By default, only those Issues and Pull Requests that have been closed or merged
8585
But you can define the parameters yourself:
8686

8787
```Bash
88-
-i, --without-issues Exclude issues from processing
89-
-s, --without-pulls Exclude Pull Requests from processing
88+
-i, --except-issues Exclude issues from processing
89+
-p, --except-pulls Exclude Pull Requests from processing
9090
-o, --with-open Process including open Issues and Pull Requests
9191
-n, --no-interaction Do not ask any interactive question
9292
-q, --quiet Do not output any message
@@ -95,7 +95,7 @@ But you can define the parameters yourself:
9595
For example:
9696

9797
```Bash
98-
# without issues + with open
98+
# except issues + with open
9999
notifications read qwerty -ion
100100
```
101101

app/Commands/ReadCommand.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class ReadCommand extends Command
1515
{
1616
protected $signature = 'read'
1717
. ' {repository?* : Full or partial repository names}'
18-
. ' {--i|without-issues : Exclude issues from processing}'
19-
. ' {--s|without-pulls : Exclude Pull Requests from processing}'
18+
. ' {--i|except-issues : Exclude issues from processing}'
19+
. ' {--p|except-pulls : Exclude Pull Requests from processing}'
2020
. ' {--o|with-open : Process including open Issues and Pull Requests}'
2121
. ' {--token= : Specifies the token to use}';
2222

@@ -55,8 +55,8 @@ protected function read(array $repositories): void
5555
{
5656
$this->gitHub()
5757
->repositories($repositories)
58-
->withoutIssues($this->withoutIssues())
59-
->withoutPulls($this->withoutPulls())
58+
->exceptIssues($this->exceptIssues())
59+
->exceptPulls($this->exceptPulls())
6060
->withOpen($this->withOpen())
6161
->when(
6262
$this->shouldBeAll($repositories),
@@ -68,8 +68,8 @@ protected function read(array $repositories): void
6868
protected function shouldBeAll(array $repositories): bool
6969
{
7070
return empty($repositories)
71-
&& ! $this->withoutIssues()
72-
&& ! $this->withoutPulls()
71+
&& ! $this->exceptIssues()
72+
&& ! $this->exceptPulls()
7373
&& $this->withOpen();
7474
}
7575

@@ -93,14 +93,14 @@ protected function repositories(): array
9393
->all();
9494
}
9595

96-
protected function withoutIssues(): bool
96+
protected function exceptIssues(): bool
9797
{
98-
return $this->option('without-issues');
98+
return $this->option('except-issues');
9999
}
100100

101-
protected function withoutPulls(): bool
101+
protected function exceptPulls(): bool
102102
{
103-
return $this->option('without-pulls');
103+
return $this->option('except-pulls');
104104
}
105105

106106
protected function withOpen(): bool

app/Services/GitHub.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class GitHub
1717
{
1818
protected array $repositories = [];
1919

20-
protected bool $withoutIssues = false;
20+
protected bool $exceptIssues = false;
2121

22-
protected bool $withoutPulls = false;
22+
protected bool $exceptPulls = false;
2323

2424
protected bool $withOpen = false;
2525

@@ -40,16 +40,16 @@ public function repositories(array $repositories): self
4040
return $this;
4141
}
4242

43-
public function withoutIssues(bool $withoutIssues): self
43+
public function exceptIssues(bool $exceptIssues): self
4444
{
45-
$this->withoutIssues = $withoutIssues;
45+
$this->exceptIssues = $exceptIssues;
4646

4747
return $this;
4848
}
4949

50-
public function withoutPulls(bool $withoutPulls): self
50+
public function exceptPulls(bool $exceptPulls): self
5151
{
52-
$this->withoutPulls = $withoutPulls;
52+
$this->exceptPulls = $exceptPulls;
5353

5454
return $this;
5555
}
@@ -151,11 +151,11 @@ protected function shouldSkip(NotificationData $notification, ItemData $item): b
151151
return true;
152152
}
153153

154-
if ($this->withoutIssues && $notification->type === 'Issue') {
154+
if ($this->exceptIssues && $notification->type === 'Issue') {
155155
return true;
156156
}
157157

158-
if ($this->withoutPulls && $notification->type === 'PullRequest') {
158+
if ($this->exceptPulls && $notification->type === 'PullRequest') {
159159
return true;
160160
}
161161

0 commit comments

Comments
 (0)