跳到主要内容

Configuring WebHook

A Webhook will allow GitCode to notify your external service when certain specific events occur; we will send a POST request to the URL you specify when these events happen. This mechanism can be used for integrating and automating workflows, such as continuous integration, message notifications, and third-party service integration.

Accessing the Entry Point​


First, go to the project homepage, click on the "Project Settings" tab in the navigation bar, then click on "WebHook" in the sidebar to enter the WebHook settings page.

image-20241227192701378

Creating a New WebHook​


  1. Click "Add New WebHook", then fill in the relevant content: URL, WebHook password/signature key, POST request content type, event type.

    • URL: When an event occurs, GitCode will send a Post request to the specified URL.

    • WebHook Password/Signature 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.
      • A signature key is a more secure verification method based on encryption algorithms. GitCode will encrypt the request content using the configured key and attach the signature in the request header (X-GitCode-Signature-256:sha256=signature). The receiving end can use the same key and algorithm to calculate the signature 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.

    image-20241230094347576

  2. After creation, you can see the existing WebHook list on the settings page.

    image-20241230095606164

  3. Click on a WebHook to enter the WebHook details page, where you can configure the WebHook again or view the request sending records here.

    image-20241230100352354

Activating, Stopping, and Deleting​


In the settings page, you can activate or stop WebHooks, and also delete the specified WebHook.

image-20241230100013232

Use the Webhook feature to establish a smooth event-driven workflow with GitCode.

Event Parameter Description​

Commit Event

Issue Event

Pull Request Event

Tag Push Event

Note Event