mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -84,7 +84,11 @@ class Bitbucket extends Controller
|
||||
$failure_key = $this->manualWebhookFailureRateLimitKey($request, 'bitbucket', $full_name, $branch);
|
||||
// A redelivery of the same signed payload is one guess.
|
||||
$failure_attempt = $this->manualWebhookSignedPayloadAttempt($request, $x_bitbucket_token);
|
||||
$applications = $this->manualWebhookApplications(Application::query()->where('git_branch', $branch), $full_name);
|
||||
$applications = Application::query();
|
||||
if ($x_bitbucket_event !== 'pullrequest:rejected' && $x_bitbucket_event !== 'pullrequest:fulfilled') {
|
||||
$applications->where('git_branch', $branch);
|
||||
}
|
||||
$applications = $this->manualWebhookApplications($applications, $full_name);
|
||||
if ($applications->isEmpty()) {
|
||||
return $this->unauthenticatedManualWebhookResponse($failure_key, $failure_attempt);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,10 @@ class Gitea extends Controller
|
||||
}
|
||||
}
|
||||
if ($x_gitea_event === 'pull_request') {
|
||||
$applications = $this->manualWebhookApplications($applications->where('git_branch', $base_branch), $full_name);
|
||||
if ($action !== 'closed') {
|
||||
$applications->where('git_branch', $base_branch);
|
||||
}
|
||||
$applications = $this->manualWebhookApplications($applications, $full_name);
|
||||
if ($applications->isEmpty()) {
|
||||
return $this->unauthenticatedManualWebhookResponse($failure_key, $failure_attempt);
|
||||
}
|
||||
|
||||
@@ -231,7 +231,10 @@ class Gitlab extends Controller
|
||||
'skip_deploy' => $skip_deploy_pr,
|
||||
] = $this->readMergeRequestPayload($payload);
|
||||
|
||||
$applications = $applications->where('git_branch', $base_branch)->get();
|
||||
if (! in_array($action, ['closed', 'close', 'merge'])) {
|
||||
$applications->where('git_branch', $base_branch);
|
||||
}
|
||||
$applications = $applications->get();
|
||||
|
||||
foreach ($applications as $application) {
|
||||
if (! $application->destination->server->isFunctional()) {
|
||||
@@ -440,7 +443,10 @@ class Gitlab extends Controller
|
||||
}
|
||||
}
|
||||
if ($x_gitlab_event === 'merge_request') {
|
||||
$applications = $this->manualWebhookApplications($applications->where('git_branch', $base_branch), $full_name);
|
||||
if (! in_array($action, ['closed', 'close', 'merge'])) {
|
||||
$applications->where('git_branch', $base_branch);
|
||||
}
|
||||
$applications = $this->manualWebhookApplications($applications, $full_name);
|
||||
if ($applications->isEmpty()) {
|
||||
return $this->unauthenticatedManualWebhookResponse($failure_key, $failure_attempt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user