Skip to content

[Bug]: Deploying an application via API does not set repository_project_id #5375

@davidmokos

Description

@davidmokos

Error Message and Logs

I'm using the Create (Private - GH App) API for creating a new application in our project.

In the payload I provide the git_repository (GitHub app has access to that org). When I fetch the application via API I can see that the repository_project_id is null.

That is a problem because GitHub Webhooks won't create an automatic deployment.

In app/Http/Controllers/Webhook/Github.php line 314:

$applications = Application::where('repository_project_id', $id)->whereRelation('source', 'is_public', false);

This will not return any application because the repository_project_id is not set. Maybe we can compare the full name of the repository in this case?

Steps to Reproduce

  1. Create an app via API (Private - GH App)
  2. Push to the connected GH repo
  3. See that no deployment was created even though the webhook was received successfully

Example Repository URL

No response

Coolify Version

v4.0.0-beta.397

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions