Fix styling
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
41fb6a1fc9
commit
d86274cc37
@@ -6,25 +6,26 @@ use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
|
||||
class GithubApp extends BaseModel
|
||||
{
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
protected $appends = ['type'];
|
||||
|
||||
protected $casts = [
|
||||
'is_public' => 'boolean',
|
||||
'type' => 'string'
|
||||
'type' => 'string',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'client_secret',
|
||||
'webhook_secret',
|
||||
];
|
||||
|
||||
|
||||
static public function public()
|
||||
public static function public()
|
||||
{
|
||||
return GithubApp::whereTeamId(currentTeam()->id)->whereisPublic(true)->whereNotNull('app_id')->get();
|
||||
}
|
||||
|
||||
static public function private()
|
||||
public static function private()
|
||||
{
|
||||
return GithubApp::whereTeamId(currentTeam()->id)->whereisPublic(false)->whereNotNull('app_id')->get();
|
||||
}
|
||||
@@ -34,7 +35,7 @@ class GithubApp extends BaseModel
|
||||
static::deleting(function (GithubApp $github_app) {
|
||||
$applications_count = Application::where('source_id', $github_app->id)->count();
|
||||
if ($applications_count > 0) {
|
||||
throw new \Exception('You cannot delete this GitHub App because it is in use by ' . $applications_count . ' application(s). Delete them first.');
|
||||
throw new \Exception('You cannot delete this GitHub App because it is in use by '.$applications_count.' application(s). Delete them first.');
|
||||
}
|
||||
$github_app->privateKey()->delete();
|
||||
});
|
||||
|
Reference in New Issue
Block a user