feat: update private key nam with new slug as well
This commit is contained in:
parent
56f6bdf7a7
commit
5f985426ab
2 changed files with 4 additions and 2 deletions
|
|
@ -463,7 +463,7 @@ public function redirect(Request $request)
|
|||
$private_key = data_get($data, 'pem');
|
||||
$webhook_secret = data_get($data, 'webhook_secret');
|
||||
$private_key = PrivateKey::create([
|
||||
'name' => $slug,
|
||||
'name' => "github-app-{$slug}",
|
||||
'private_key' => $private_key,
|
||||
'team_id' => $github_app->team_id,
|
||||
'is_git_related' => true,
|
||||
|
|
|
|||
|
|
@ -198,8 +198,10 @@ public function syncGithubAppName()
|
|||
if ($app_slug) {
|
||||
$this->github_app->name = $app_slug;
|
||||
$this->name = str($app_slug)->kebab();
|
||||
$privateKey->name = "github-app-{$app_slug}";
|
||||
$privateKey->save();
|
||||
$this->github_app->save();
|
||||
$this->dispatch('success', 'Github App name synchronized successfully.');
|
||||
$this->dispatch('success', 'Github App name and SSH key name synchronized successfully.');
|
||||
} else {
|
||||
$this->dispatch('info', 'Could not find app slug in GitHub response.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue