mirror of
https://github.com/tiennm99/coolify.git
synced 2026-05-12 22:57:58 +00:00
Fix double deployments with multiple GitHub Apps on same repo (#7604)
This commit is contained in:
@@ -309,7 +309,9 @@ class Github extends Controller
|
|||||||
if (! $id || ! $branch) {
|
if (! $id || ! $branch) {
|
||||||
return response('Nothing to do. No id or branch found.');
|
return response('Nothing to do. No id or branch found.');
|
||||||
}
|
}
|
||||||
$applications = Application::where('repository_project_id', $id)->whereRelation('source', 'is_public', false);
|
$applications = Application::where('repository_project_id', $id)
|
||||||
|
->where('source_id', $github_app->id)
|
||||||
|
->whereRelation('source', 'is_public', false);
|
||||||
if ($x_github_event === 'push') {
|
if ($x_github_event === 'push') {
|
||||||
$applications = $applications->where('git_branch', $branch)->get();
|
$applications = $applications->where('git_branch', $branch)->get();
|
||||||
if ($applications->isEmpty()) {
|
if ($applications->isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user