Skip to content

Commit

Permalink
Update supported events list
Browse files Browse the repository at this point in the history
  • Loading branch information
JSn1nj4 committed Apr 16, 2024
1 parent 5d6108a commit d070ea6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app/Services/Github/GithubService.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class GithubService implements GitHostService
'IssuesEvent',
'PublicEvent',
'PullRequestEvent',
'PullRequestReviewCommentEvent',
'PullRequestReviewEvent',
'PushEvent',
'WatchEvent',
];
Expand All @@ -51,10 +53,10 @@ class GithubService implements GitHostService
public function __construct()
{
foreach ([
'services.github.token',
'mail.to.name',
'mail.to.address',
] as $key) {
'services.github.token',
'mail.to.name',
'mail.to.address',
] as $key) {
if (config($key) === null) {
throw new Exception("Config option '{$key}' not set.");
}
Expand Down Expand Up @@ -142,11 +144,11 @@ public function filterEventTypes(Response $response): Collection
*/
public function getEvents(string $user, int $count): Collection
{
if($count < 1) {
if ($count < 1) {
throw new Exception("'\$count' value must be 1 or higher. Value is '{$count}'.");
}

if($count > 100) {
if ($count > 100) {
throw new Exception("'\$count' value must be 100 or less. Value is '{$count}'.");
}

Expand Down

0 comments on commit d070ea6

Please sign in to comment.