Skip to content

[Bug]: "Managed by your Git App" hides webhook setup for GitLab sources, but Coolify never creates GitLab webhooks #11602

Description

@KienThe

Description and Error Message

Applications sourced from a GitLab App show this empty state on the Webhooks page:

Managed by your Git App
This application uses an official Git App, so Coolify configures repository webhooks automatically.

This is not true for GitLab. Coolify never calls GitLab's POST /api/v4/projects/:id/hooks — there is no call to that endpoint anywhere in the codebase. No webhook is ever created in the GitLab project.

The result: users connect a GitLab App, read that webhooks are handled automatically, and then wait for push deployments that never fire. Nothing in the UI indicates that the webhook has to be created by hand.

Root cause

resources/views/livewire/project/shared/webhooks.blade.php gates the manual webhook form on:

@if ($githubManualWebhook && $gitlabManualWebhook)

generateGitManualWebhook() (bootstrap/helpers/shared.php:1541) returns null whenever $resource->source_id is set — regardless of provider:

if ($resource->source_id !== 0 && ! is_null($resource->source_id)) {
    return null;
}

So any Git App source, GitHub or GitLab, falls into the @else branch and renders the "configures repository webhooks automatically" message.

That claim only holds for GitHub, where the webhook is registered at the App level via hook_attributes in the App manifest (resources/views/livewire/source/github/change.blade.php:401); GitHub then delivers events for every installed repository without any per-repo API call.

GitLab has no equivalent — the "GitLab App" is just an OAuth application. Webhooks only exist per project (or per group, which is Premium-only), and nothing in Coolify creates them.

Expected Behavior

  1. For applications whose source is a GitlabApp, the Webhooks page must not claim webhooks are configured automatically.
  2. It should surface the source-level webhook URL (/webhooks/source/gitlab/events) and the GitLab App's webhook secret token, with a note that the webhook must be added per project in GitLab under Settings → Webhooks.
  3. Better: Coolify creates the webhook through the GitLab API when a repository is selected. The OAuth scope already requested is sufficient — api read_user read_repository (app/Livewire/Source/Gitlab/Change.php:356) — and POST /projects/:id/hooks only requires the Maintainer or Owner role.
  4. Minimum fix: restrict the empty state to GitHub App sources and fall back to the existing manual form for GitLab.

Steps to Reproduce

  1. Add a GitLab App source pointing at a self-hosted GitLab instance and complete the OAuth connection.
  2. Create an application from a private GitLab repository using that source.
  3. Open the application → Webhooks.
  4. Observe "Managed by your Git App — Coolify configures repository webhooks automatically". No webhook URL and no secret are shown.
  5. Open the GitLab project → Settings → Webhooks: no webhook exists.
  6. Push a commit to the tracked branch: no deployment is triggered.

Example Repository URL

No response

Coolify Version

v4.3.14

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

No response

Screenshots / Visuals

No response

Additional Information

Verified against main @ b8866b8.

Relevant code:

  • routes/webhooks.phpPOST /source/gitlab/events and /source/gitlab/events/manual
  • app/Http/Controllers/Webhook/Gitlab.php::normal() — matches on source_id + repository_project_id + git_branch
  • app/Models/GitlabApp.php:85findByWebhookToken()
  • app/Livewire/Source/Gitlab/Create.php:78 — the webhook token is generated per source

Because the webhook token lives on the source rather than the application, a single secret already covers every project attached to that source. An auto-create implementation would therefore only need to POST the hook per project, reusing the existing token — no extra secret management.

Workaround for anyone hitting this: create the webhook manually in each GitLab project, pointing at https://<coolify-domain>/webhooks/source/gitlab/events, with the source's Webhook secret token in the Secret token field, triggering on Push events.

Worth documenting as well: GitLab system hooks look like a shortcut for covering a whole instance on the Free tier, but they do not work with Coolify. Their push payload uses event_name: "push" and a top-level project_id, whereas Gitlab@normal reads object_kind and project.id. Both resolve to null, so the request is rejected with Event not allowed. Only push and merge_request events are allowed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔍 TriageIssues that need assessment and prioritization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions