Fix styling
This commit is contained in:
committed by
github-actions[bot]
parent
41fb6a1fc9
commit
d86274cc37
@@ -12,18 +12,21 @@ use Illuminate\Queue\Middleware\WithoutOverlapping;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class GithubAppPermissionJob implements ShouldQueue, ShouldBeEncrypted
|
||||
class GithubAppPermissionJob implements ShouldBeEncrypted, ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public $tries = 4;
|
||||
|
||||
public function backoff(): int
|
||||
{
|
||||
return isDev() ? 1 : 3;
|
||||
}
|
||||
|
||||
public function __construct(public GithubApp $github_app)
|
||||
{
|
||||
}
|
||||
|
||||
public function middleware(): array
|
||||
{
|
||||
return [(new WithoutOverlapping($this->github_app->uuid))];
|
||||
@@ -40,7 +43,7 @@ class GithubAppPermissionJob implements ShouldQueue, ShouldBeEncrypted
|
||||
$github_access_token = generate_github_jwt_token($this->github_app);
|
||||
$response = Http::withHeaders([
|
||||
'Authorization' => "Bearer $github_access_token",
|
||||
'Accept' => 'application/vnd.github+json'
|
||||
'Accept' => 'application/vnd.github+json',
|
||||
])->get("{$this->github_app->api_url}/app");
|
||||
$response = $response->json();
|
||||
$permissions = data_get($response, 'permissions');
|
||||
@@ -51,7 +54,7 @@ class GithubAppPermissionJob implements ShouldQueue, ShouldBeEncrypted
|
||||
$this->github_app->save();
|
||||
$this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('GithubAppPermissionJob failed with: ' . $e->getMessage());
|
||||
send_internal_notification('GithubAppPermissionJob failed with: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user