feat: add PR comments

This commit is contained in:
Andras Bacsai
2024-01-26 18:46:50 +01:00
parent 9628072b0c
commit 5c334bbac6
5 changed files with 30 additions and 18 deletions

View File

@@ -69,6 +69,7 @@ function githubApi(GithubApp|GitlabApp|null $source, string $endpoint, string $m
}
$json = $response->json();
if ($response->failed() && $throwError) {
ray($json);
throw new \Exception("Failed to get data from {$source->name} with error:<br><br>" . $json['message'] . "<br><br>Rate Limit resets at: " . Carbon::parse((int)$response->header('X-RateLimit-Reset'))->format('Y-m-d H:i:s') . 'UTC');
}
return [