# Default webhook does not run on repository creation

**URL:** <https://forum.gitea.com/t/default-webhook-does-not-run-on-repository-creation/2135>\
**Category:** Install/Maintain/Configure\
**Created:** [May 8, 2020, 8:20am UTC](https://forum.gitea.com/t/default-webhook-does-not-run-on-repository-creation/2135 "2020-05-08T08:20:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![StripeBanana](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@StripeBanana](https://forum.gitea.com/u/StripeBanana)\
**Post date:** [May 8, 2020, 8:20am UTC](https://forum.gitea.com/t/default-webhook-does-not-run-on-repository-creation/2135/1 "2020-05-08T08:20:39Z")

</div>

Hi,

Because there is currently no way to configure default git hooks, I have created a default webhook that installs (or updates) a pre-recieve hook in the repository.  
The webhook is configured with ‘trigger on’ -\> ‘custom events’ -\> ‘create’ + ‘push’ + ‘repository’  
I expected the webhook to trigger when a user creates a repository in Gitea, since the comment on the ‘repository’ trigger is ‘repository created or deleted’.

When I create an empty repository, the hook is not triggered.  
After I initialize the repo and push the first content, the ‘create’ and ‘push’ events do trigger the webhook, but the pre-recieve git hook that gets installed is not run for this push. If I push more content, the git hook also triggers.

Is this a bug? How can I get the webhook to trigger the moment a repository is created?

Thanks
