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: client and webhook secret disappear after sync

peaklabs-devf51300a19213
diff --git a/app/Livewire/Source/Github/Change.php b/app/Livewire/Source/Github/Change.php
index b1f0605bb6..51c5ae3e9b 100644
--- a/app/Livewire/Source/Github/Change.php
+++ b/app/Livewire/Source/Github/Change.php
@@ -56,6 +56,13 @@ class Change extends Component
'github_app.administration' => 'nullable|string',
];
+ public function boot()
+ {
+ if ($this->github_app) {
+ $this->github_app->makeVisible(['client_secret', 'webhook_secret']);
+ }
+ }
+
public function checkPermissions()
{
GithubAppPermissionJob::dispatchSync($this->github_app);
@@ -102,10 +109,10 @@ class Change extends Component
try {
$github_app_uuid = request()->github_app_uuid;
$this->github_app = GithubApp::ownedByCurrentTeam()->whereUuid($github_app_uuid)->firstOrFail();
+ $this->github_app->makeVisible(['client_secret', 'webhook_secret']);
$this->applications = $this->github_app->applications;
$settings = instanceSettings();
- $this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');
$this->name = str($this->github_app->name)->kebab();
$this->fqdn = $settings->fqdn;