Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab new project setup webhook

I have GitLab setup on a server. Every time I create a new project under my user, I have to manually add a Web Hook by navigating to Project -> Settings -> Web Hooks -> Add Web Hook

Since many users will be creating projects on the hosted GitLab it will be difficult to setup Web Hooks for each project individually.

Is there a way, so that when a new project is created, it automatically (as default) sets up a Web Hook as part of the new project?

Any help is much appreciated.

like image 547
Kunal Aggarwal Avatar asked Feb 15 '23 12:02

Kunal Aggarwal


1 Answers

You could probably find a way to automate this via the System Hooks API. Listen for the project_create hook event, then make a call to the project hook endpoint to add the one you want.

It's webhooks all the way down!

like image 136
John Sheehan Avatar answered Feb 17 '23 01:02

John Sheehan