pull request webhooks

This commit is contained in:
Andras Bacsai
2023-05-31 11:24:02 +02:00
parent 232d2ccf79
commit c953482ba9
16 changed files with 272 additions and 64 deletions

View File

@@ -75,10 +75,7 @@ class Previews extends Component
ray('Stopping container: ' . $container_name);
instant_remote_process(["docker rm -f $container_name"], $this->application->destination->server, throwError: false);
$found = ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->first();
if ($found) {
$found->delete();
}
ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->delete();
$this->application->refresh();
} catch (\Throwable $th) {
return general_error_handler($th, $this);