Skip to content

fix(api): manual pr deployments - #12047

Open
yannisgu wants to merge 3 commits into
coollabsio:nextfrom
yannisgu:fix/manual-preview-deployment
Open

yannisgu wants to merge 3 commits into
coollabsio:nextfrom
yannisgu:fix/manual-preview-deployment

Conversation

@yannisgu

Copy link
Copy Markdown

Changes

  • This PR allow to create PR deployments via the API, when they were not automatically created yet, same as it is possible via the UI

Issues

  • Fixes

Category

  • Bug fix
  • Improvement
  • New feature
  • Adding new one click service
  • Fixing or updating existing one click service

Preview

AI Assistance

  • AI was NOT used to create this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: Claude Code
  • How extensively: Research and Implementation, testing of edge cases

Testing

  • Create a new application on coolify for an existing repo
  • Start PR deploy with: curl -sS -X POST "https://$BASE_URL/api/v1/deploy" -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -d '{"uuid":"$APP_ID","pull_request_id":42}'
  • Check that deployment was started and pull request was created

Contributor Agreement

Important

  • I have read and understood the contributor guidelines. If I have failed to follow any guideline, I understand that this PR may be closed without review.
  • I have searched existing issues and pull requests (including closed ones) to ensure this isn't a duplicate.
  • I have tested all the changes thoroughly with a local development instance of Coolify and I am confident that they will work as expected when a maintainer tests them.

UpsertApplicationPreview regenerated the preview domains on every call,
including from the deployment entrypoints. With a `{{random}}` preview URL
template that rewrote the stored URL of an existing preview even when the
deployment was rejected (queue full) or skipped (duplicate commit), leaving
a URL that no running container answers on.

Domains are now only generated for previews created by the action, or when
the caller explicitly asks for a regeneration - which is what the "add
preview" UI action does, matching its previous behaviour. Accepted
deployments still regenerate the domains when ApplicationDeploymentJob is
dispatched.

The action also unconditionally passed generateWithoutApplicationDomain,
so the API started handing domainless applications (Docker Image previews
in particular) a public sslip.io domain where it previously left the FQDN
unset. That flag is now opt-in and only the UI sets it.
@github-actions
github-actions Bot changed the base branch from main to next September 28, 2026 07:51
@github-actions

Copy link
Copy Markdown
Contributor

Based on the selected category, this PR's base branch was automatically changed from main to next.

New features and improvements target next.

If you believe this is incorrect, please let a maintainer know.

This branch has not been deployed

No deployments
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.

1 participant