{"id":15019847,"url":"https://github.com/oneduo/laravel-gitlab-webhook-client","last_synced_at":"2026-02-17T02:02:06.272Z","repository":{"id":169075344,"uuid":"644974974","full_name":"oneduo/laravel-gitlab-webhook-client","owner":"oneduo","description":"A client to handle incoming Gitlab webhook requests","archived":false,"fork":false,"pushed_at":"2026-01-12T19:20:28.000Z","size":135,"stargazers_count":7,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-13T00:43:15.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oneduo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-24T16:39:04.000Z","updated_at":"2026-01-12T19:20:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1d91f67-971a-4bc2-ba4a-7e79c050b86d","html_url":"https://github.com/oneduo/laravel-gitlab-webhook-client","commit_stats":{"total_commits":62,"total_committers":6,"mean_commits":"10.333333333333334","dds":"0.32258064516129037","last_synced_commit":"6dfb3f733c0f32502276df52e97f8bd2548761ee"},"previous_names":["oneduo/laravel-gitlab-webhook-client"],"tags_count":17,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/oneduo/laravel-gitlab-webhook-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneduo%2Flaravel-gitlab-webhook-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneduo%2Flaravel-gitlab-webhook-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneduo%2Flaravel-gitlab-webhook-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneduo%2Flaravel-gitlab-webhook-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oneduo","download_url":"https://codeload.github.com/oneduo/laravel-gitlab-webhook-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneduo%2Flaravel-gitlab-webhook-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29530143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T00:57:22.232Z","status":"online","status_checked_at":"2026-02-17T02:00:08.105Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:54:11.359Z","updated_at":"2026-02-17T02:02:06.242Z","avatar_url":"https://github.com/oneduo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A client to handle incoming Gitlab webhook requests\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/oneduo/laravel-gitlab-webhook-client.svg?style=flat-square)](https://packagist.org/packages/oneduo/laravel-gitlab-webhook-client)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/oneduo/laravel-gitlab-webhook-client/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/oneduo/laravel-gitlab-webhook-client/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/oneduo/laravel-gitlab-webhook-client/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/oneduo/laravel-gitlab-webhook-client/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/oneduo/laravel-gitlab-webhook-client.svg?style=flat-square)](https://packagist.org/packages/oneduo/laravel-gitlab-webhook-client)\n\nThis a tiny client that allows you to listen to Gitlab webhooks in your Laravel application. You may use the events\ndispatched and use the data they provide to perform actions in your application.\n\n## Webhook types supported:\n\n- [x] [Push Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#push-events)\n- [ ] [Tag Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#tag-events)\n- [x] [Issue Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#issue-events)\n- [x] [Comments Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-events)\n- [x] [Merge request Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#merge-request-events)\n- [ ] [Wiki page Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#wiki-page-events)\n- [x] [Pipeline Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#pipeline-events)\n- [ ] [Job Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#job-events)\n- [ ] [Deployment Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#deployment-events)\n- [ ] [Release Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#group-member-events)\n- [ ] [Subgroup Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#subgroup-events)\n- [ ] [Feature flag Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#feature-flag-events)\n- [ ] [Release events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#release-events)\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require oneduo/laravel-gitlab-webhook-client\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"gitlab-webhook-client-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nreturn [\n    /*\n    |--------------------------------------------------------------------------\n    | Webhook route\n    |--------------------------------------------------------------------------\n    |\n    | Here you may choose to enable the default webhook route provided by\n    | the package. If you decide to disable this, you should manually register\n    | the route in your application and implement the event dispatching logic\n    | within your route.\n    |\n    | This registers the following route: POST /gitlab-webhook\n    |\n    | default: true\n    */\n    'route_enabled' =\u003e true,\n\n    /*\n    |--------------------------------------------------------------------------\n    | Secret Token Middleware\n    |--------------------------------------------------------------------------\n    |\n    | You may set the value of the secret token defined in Gitlab.\n    | The package will validate all incoming requests against this given token,\n    | and reject all unauthorized requests.\n    |\n    | Set the value to NULL to disable the middleware.\n    |\n    | default: null\n    */\n    'secret_token' =\u003e env('GITLAB_WEBHOOK_SECRET_TOKEN'),\n];\n\n```\n\n## Usage\n\n### Setting up Gitlab\n\nTo get started, you must first set up a webhook in your Gitlab project.  \nYou may follow the official documentation provided\nhere https://docs.gitlab.com/ee/user/project/integrations/webhooks.html.\n\n### Setting up the webhook url\n\nBy default, when the `route_enabled` config is set to true, the package automatically registers a route to handle all\nincoming webhook requests.  \nIt is registered as `POST /gitlab-webhook` and you may inspect your routes using the `php artisan route:list` command.\n\n\u003e **Note** If you wish to implement your own route, please take a look at the `WebhookController` to implement a similar\n\u003e logic to\n\u003e dispatch events.\n\nWhen Gitlab sends a webhook request to your application, the package will dispatch an event based on the type of webhook\nreceived.\n\nFor instance, if Gitlab sends a `merge request` webhook, the package will dispatch a `MergeRequestEvent` event.\n\nYou may register your own listener like this:\n\n```php\nclass EventServiceProvider extends ServiceProvider\n{\n    /**\n     * The event to listener mappings for the application.\n     *\n     * @var array\u003cclass-string, array\u003cint, class-string\u003e\u003e\n     */\n    protected $listen = [\n        MergeRequestEvent::class =\u003e [\n            MergeRequestEventListener::class,\n        ],\n    ];\n}\n```\n\nAll the events are type-hinted to provide easy access to the event attributes and data:\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App;\n\nuse App\\Gitlab\\Events\\MergeRequestEvent;\n\nclass MergeRequestEventListener\n{\n    public function handle(MergeRequestEvent $event): void\n    {\n        logger()-\u003einfo('New merge request event received');\n        logger()-\u003einfo($event-\u003emergeRequest-\u003etitle);\n        logger()-\u003einfo('By: ' . $event-\u003emergeRequest-\u003elast_commit-\u003eauthor-\u003eemail);\n    }\n}\n```\n\n\u003e **Note** You may use individual event listeners for each event type or use a single listener that listens\n\u003e to `WebhookEventContract` that will catch all events dispatched.\n\n\u003e **Note** Please note that some attributes and data is considered **nullable**, and you must implement the necessary\n\u003e null checks on these values.\n\n### Deduplication\n\nWebhook deduplication is not guaranteed by Gitlab. You may use the `uuid` property on each event to handle deduplication\nwithin your application.\n\n### Security\n\nEach event exposes the headers provided by Gitlab. You may use the `X-Gitlab-Token` header to verify the request\nauthenticity against the secret token you have set in your Gitlab project settings.\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Charaf Rezrazi](https://github.com/Rezrazi)\n- [Mikaël Popowicz](https://github.com/mikaelpopowicz)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneduo%2Flaravel-gitlab-webhook-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foneduo%2Flaravel-gitlab-webhook-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneduo%2Flaravel-gitlab-webhook-client/lists"}