fix
This commit is contained in:
parent
ca777384eb
commit
3d4e985aa6
@ -69,11 +69,11 @@ public function stop(int $pull_request_id)
|
|||||||
ray('Stopping container: ' . $container_name);
|
ray('Stopping container: ' . $container_name);
|
||||||
|
|
||||||
instant_remote_process(["docker rm -f $container_name"], $this->application->destination->server, throwError: false);
|
instant_remote_process(["docker rm -f $container_name"], $this->application->destination->server, throwError: false);
|
||||||
dispatch(new ContainerStatusJob(
|
$found = ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->first();
|
||||||
application: $this->application,
|
if ($found) {
|
||||||
container_name: $container_name,
|
$found->delete();
|
||||||
pull_request_id: $pull_request_id
|
}
|
||||||
));
|
$this->application->refresh();
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
return general_error_handler($th, $this);
|
return general_error_handler($th, $this);
|
||||||
}
|
}
|
||||||
|
@ -594,7 +594,7 @@ private function importing_git_repository()
|
|||||||
$commands = [$this->execute_in_builder($git_clone_command)];
|
$commands = [$this->execute_in_builder($git_clone_command)];
|
||||||
|
|
||||||
if ($this->pull_request_id) {
|
if ($this->pull_request_id) {
|
||||||
$commands[] = $this->execute_in_builder("cd {$this->workdir} && git fetch origin pull/{$this->pull_request_id}/head:$pr_branch_name && git checkout $pr_branch_name");
|
$commands[] = $this->execute_in_builder("cd {$this->workdir} && git fetch origin pull/{$this->pull_request_id}/head:$pr_branch_name >/dev/null 2>&1 && git checkout $pr_branch_name >/dev/null 2>&1");
|
||||||
}
|
}
|
||||||
return $commands;
|
return $commands;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user