All Products
Search
Document Center

EventBridge:Integrate Gitee

Last Updated:Sep 28, 2023

This topic describes how to use an HTTP event source to integrate Gitee with EventBridge.

Background information

Gitee is a Git-based code hosting platform that provides stable hosting services for developers. EventBridge supports fast integration with Gitee to manage alerts and events in a centralized manner.

Before you begin

Step 1: Create an event source for Gitee in EventBridge

Create an event source of the HTTP/HTTPS Events type in the EventBridge console. The following table describes the parameters. For more information, see Create a custom event source of the HTTP/HTTPS Events type.

  • Request Type: Select HTTP&HTTPS.

  • Request Method: Select a POST.

  • Security Configuration: Select Optional.

After the event source is created, you can find the custom event source in the event source list, and then click Details to view the configuration information. Internet request URL can be used as the webhook URL of the event source. pic-1

Step 2: Configure a webhook in Gitee

  1. Log on to the Gitee console and click the name of a code repository on the Repositories page.

  2. In the top navigation bar, click Settings. On the Settings page, click WebHooks in the left-side navigation pane.

  3. In the upper-right corner of the WebHooks page, click Add WebHook.

  4. On the Add WebHook page, follow the on-screen instructions to configure the parameters and click Add.

    • URL: Enter the Internet request URL that is generated in Step 1: Create an event source for Gitee in EventBridge.

    • Events: Select one or more operations as the condition for triggering an event. For example, if you set this parameter to Push, an event is triggered when you perform a Push operation.

Step 3: Trigger an event

After you add a webhook, you can click Test on the page that appears to trigger a test event.

Step 4: Verify the result

  1. Log on to the EventBridge console.
  2. In the top navigation bar, select the region.
  3. In the left-side navigation pane, click Event Buses.
  4. In the left-side navigation pane, click Event Tracking to view and verify the obtained event information.