-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Bitbucket Previews are not updated on push #2793
Comments
I'll look at this later tomorrow, seems like it's the same issue that was going on with gitea that I fixed and got merged in version 308 |
…y replacing repo:push with pullrequest:updated in bitbucket webhook hander Bitbucket's repo:push webhook doesn't provide the destination branch name in new commits, which prevents Coolify from finding the correct application to update preview deployments. By switching to pullrequest:updated and only processing updates due to new commits, we can reliably get the correct branch name that matches the Coolify application, ensuring preview deployments are properly updated. - Remove repo:push event handling in favor of pullrequest:updated - Add check to ignore PR updates not related to new commits - Update handled_events collection to reflect new webhook strategy Closes coollabsio#2793
The repo:push payload lacks the destination branch name, using push.changes.0.new.name instead. While this works for updates, it causes failures in preview deployments when a PR receives new commits. Coolify looks for git_branch in the applications table, but instead, it finds the source branch name, causing issues in preview deployment updates. By also processing pullrequest:updated, we ensure that preview deployments remain in sync even when PRs are updated. However, this event triggers on multiple actions (e.g., PR title changes, reviewer updates), which results in extra redeploys. Since Coolify doesn’t store commit hashes for preview deployments, handling these extra redeploys is the best workaround for Bitbucket. A PR is open |
Description
Pushing to a PR branch doesn't update the Preview deployment.
This is the response from /webhooks/source/bitbucket/events/manual:
Minimal Reproduction
Version
v4.0.0-beta.307
The text was updated successfully, but these errors were encountered: