From e270896a834f9f73c25b3e27fe596d2ced55b414 Mon Sep 17 00:00:00 2001 From: 8ctopus <13252042+8ctopus@users.noreply.github.com> Date: Thu, 10 Oct 2019 03:33:03 +0500 Subject: [PATCH] Doc updated list of supported webhooks and added example (#8388) * Doc updated list of supported webhooks and added example * Replaced webhook password verification by signature verification --- docs/content/doc/features/webhooks.en-us.md | 82 ++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/docs/content/doc/features/webhooks.en-us.md b/docs/content/doc/features/webhooks.en-us.md index 628afb7356..1a0a180e7a 100644 --- a/docs/content/doc/features/webhooks.en-us.md +++ b/docs/content/doc/features/webhooks.en-us.md @@ -17,7 +17,15 @@ menu: Gitea supports web hooks for repository events. This can be found in the settings page `/:username/:reponame/settings/hooks`. All event pushes are POST requests. -The two methods currently supported are Gitea and Slack. +The methods currently supported are: + +- Gitea +- Gogs +- Slack +- Discord +- Dingtalk +- Telegram +- Microsoft Teams ### Event information @@ -104,3 +112,75 @@ X-Gitea-Event: push } } ``` + +### Example + +This is an example of how to use webhooks to run a php script upon push requests to the repository. +In your repository Settings, under Webhooks, Setup a Gitea webhook as follows: + +- Target URL: http://mydomain.com/webhook.php +- HTTP Method: POST +- POST Content Type: application/json +- Secret: 123 +- Trigger On: Push Events +- Active: Checked + +Now on your server create the php file webhook.php + +``` +