Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: typos and naming

peaklabs-devfef8d0c62c10
diff --git a/app/Livewire/Source/Github/Change.php b/app/Livewire/Source/Github/Change.php
index 7f92008912..b1f0605bb6 100644
--- a/app/Livewire/Source/Github/Change.php
+++ b/app/Livewire/Source/Github/Change.php
@@ -62,6 +62,7 @@ class Change extends Component
$this->github_app->refresh()->makeVisible('client_secret')->makeVisible('webhook_secret');
$this->dispatch('success', 'Github App permissions updated.');
}
+
// public function check()
// {
@@ -95,6 +96,7 @@ class Change extends Component
// ray($runners_by_repository);
// }
+
public function mount()
{
try {
@@ -147,7 +149,7 @@ class Change extends Component
}
}
- public function getUpdatePath()
+ public function getGithubAppNameUpdatePath()
{
return "{$this->github_app->html_url}/settings/apps/{$this->github_app->name}";
}
@@ -172,13 +174,13 @@ class Change extends Component
->toString();
}
- public function syncGithubAppName()
+ public function updateGithubAppName()
{
try {
$privateKey = PrivateKey::find($this->github_app->private_key_id);
if (! $privateKey) {
- $this->dispatch('error', 'Private key not found for this GitHub App.');
+ $this->dispatch('error', 'No private key found for this GitHub App.');
return;
}
@@ -201,13 +203,13 @@ class Change extends Component
$privateKey->name = "github-app-{$app_slug}";
$privateKey->save();
$this->github_app->save();
- $this->dispatch('success', 'Github App name and SSH key 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.');
+ $this->dispatch('info', 'Could not find App Name (slug) in GitHub response.');
}
} else {
$error_message = $response->json()['message'] ?? 'Unknown error';
- $this->dispatch('error', "Failed to fetch Github App information: {$error_message}");
+ $this->dispatch('error', "Failed to fetch GitHub App information: {$error_message}");
}
} catch (\Throwable $e) {
return handleError($e, $this);
diff --git a/resources/views/livewire/source/github/change.blade.php b/resources/views/livewire/source/github/change.blade.php
index 2d873b4654..3c11646c2a 100644
--- a/resources/views/livewire/source/github/change.blade.php
+++ b/resources/views/livewire/source/github/change.blade.php
@@ -60,10 +60,12 @@
<div class="flex gap-2">
<div class="flex items-end gap-2 w-full">
<x-forms.input id="github_app.name" label="App Name" disabled />
- <x-forms.button wire:click.prevent="syncGithubAppName">Sync Name</x-forms.button>
- <a href="{{ $this->getUpdatePath() }}">
+ <x-forms.button wire:click.prevent="updateGithubAppName" class="bg-coollabs">
+ Sync Name
+ </x-forms.button>
+ <a href="{{ $this->getGithubAppNameUpdatePath() }}">
<x-forms.button>
- Update
+ Rename
<x-external-link />
</x-forms.button>
</a>