Updated on 2023-07-25 GMT+08:00

Webhooks

Introduction to Webhook

Developers can configure URLs of third-party systems on the Webhook page and subscribe to events such as branch push and tag push of CodeArts Repo based on project requirements. When a subscription event occurs, you can use a webhook to send a POST request to the URL of a third-party system to trigger operations related to your system (third-party system), such as popping up a notification window, building or updating images, or performing deployment.

If you want to email repository change notifications, you can configure Notifications in General Settings.

Configuring Webhooks

To configure webhooks, you can choose Settings > Service Integration > Webhooks on the repository details page.

The settings take effect only for the repository configured.

Only repository administrators and owners can view this tab page and configure webhooks.

Table 1 Parameters for creating a webhook

Parameter

Description

Name

Custom name.

Description

Description of the webhook.

URL

(Mandatory) Provided by the third-party CI/CD system.

Token type

Used for webhook interface authentication of third-party services. The options are as follows:

  • X-Repo-Token
  • X-Gitlab-Token
  • X-Auth-Token

Token

Used for third-party CI/CD system authentication. The authentication information is stored in the HTTP request header.

Event Type

The system can subscribe to the following events:

  • Push events
  • Tag push events
  • Merge request events
  • Comments
  • A maximum of 20 webhooks can be created for a repository.
  • You can configure a token when setting up a webhook. The token will be associated with the webhook URL and sent to you in the X-Repo-Token header.