Skip to content

fix: report Coolify deployments to GitHub with branch-aware refs#9585

Open
joaomnuno wants to merge 2 commits intocoollabsio:nextfrom
joaomnuno:fix/github-deployments-preview-ref-v2
Open

fix: report Coolify deployments to GitHub with branch-aware refs#9585
joaomnuno wants to merge 2 commits intocoollabsio:nextfrom
joaomnuno:fix/github-deployments-preview-ref-v2

Conversation

@joaomnuno
Copy link
Copy Markdown

@joaomnuno joaomnuno commented Apr 15, 2026

Changes

  • Adds GitHub Deployments API sync for GitHub App sources and stores the deployments: write permission.
  • Creates deployment records when Coolify starts a deploy and updates them to in_progress, success, failure, or error.
  • Uses the branch ref for normal deployments and refs/pull/{pr}/head for preview deployments so GitHub attaches preview deployments to the PR branch.
  • Fixes automated GitHub App registration by using the live webhook endpoint and removing the invalid manifest callback URL.

Issues

Category

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

Preview

Before:

before-change

After:

deploying-after-change

deployed-after-change

AI Assistance

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

If AI was used:

  • Tools used: AI assistant
  • How extensively: Used to refine the implementation and tests. Changes were manually reviewed and validated locally.

Testing

  • php vendor/bin/pint --dirty --format agent
  • php artisan test --compact tests/Unit/GithubDeploymentHelpersTest.php tests/Feature/GithubSourceChangeTest.php tests/Feature/ModelFillableCreationTest.php tests/Feature/GithubPrivateRepositoryTest.php
  • Manual: created and installed a GitHub App with deployments: write, verified main deployments in GitHub, and verified preview deployments now show the PR branch as deploying and deployed.

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.

@joaomnuno joaomnuno marked this pull request as ready for review April 15, 2026 23:06
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