Skip to content
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

fix: Handle pullrequest:updated for reliable preview deployments #5029

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

IARayan
Copy link

@IARayan IARayan commented Feb 1, 2025

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.

Changes

  • Fixed handling of repo:push and pullrequest:updated to keep preview deployments in sync.

Issues

andrasbacsai and others added 2 commits January 28, 2025 13:48
The repo:push payload lacks the destination branch name, using push.changes.0.new.name instead. While sufficient for updates, this causes failures in preview deployments when a PR receives new commits—Coolify looks for git_branch in the applications table but finds the source branch instead.

By also processing pullrequest:updated, we ensure preview deployments remain in sync. However, this event triggers on various actions (e.g., PR title changes, reviewer updates), causing extra redeploys. Since Coolify doesn’t store commit hashes for preview deployments, handling these extra redeploys is our best workaround for Bitbucket.
@IARayan IARayan changed the title Ia rayan bitbucket preview deployment fix pullrequest update fix: Handle pullrequest:updated for reliable preview deployments Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants