Using WebHook
The Webhook will allow GitCode to notify your external service when certain specific events occur, and we will send a POST request to the URL you specify when these events happen. This mechanism can be used for integration and automation workflows, such as continuous integration, message notifications, and third-party service integration.
Access Entry
First, go to the project homepage, click on "Project Settings" in the tab bar, then click on "WebHook" in the sidebar to enter the WebHook settings page.
Creating a New WebHook
-
Click "Add New WebHook", then fill in the relevant content: URL, WebHook password/signing key, POST request content type, event type.
-
URL: When an event occurs, GitCode will send a POST request to the specified URL.
-
WebHook Password/Signing Key:
- The WebHook password is a simple string used to provide basic authentication for the Webhook. GitCode will include this password in the request header (X-GitCode-Token: password) when sending the Webhook request. The receiving end can verify this password to confirm the legality of the request.
- The signing key is a more secure verification method based on encryption algorithms. GitCode will use the configured key to encrypt the request content and attach the signature in the request header (X-GitCode-Signature-256: sha256=signature). The receiving end can calculate the signature using the same key and algorithm and compare it to confirm the integrity and legality of the request.
-
Event Type: When the selected event occurs, GitCode will automatically send a POST request.
-
-
After creation, you can see the existing WebHook list in the settings page.
-
Click on a WebHook to enter the WebHook details page, where you can configure the WebHook again or view the request sending records.
Activation, Deactivation, and Deletion
In the settings page, you can activate or deactivate WebHooks and delete specified WebHooks.
Use the Webhook feature to establish a smooth event-driven workflow with GitCode.