Merge remote-tracking branch 'origin/main'

This commit is contained in:
Andras Bacsai
2026-10-15 23:00:46 +02:00
6 changed files with 383 additions and 4 deletions
+5 -1
View File
@@ -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);
}
+4 -1
View File
@@ -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);
}
+8 -2
View File
@@ -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);
}