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 for you to manage alerts and events in a centralized manner.



Step 1: Create an event source for Gitee in EventBridge

Create an event source HTTP/HTTPS trigger 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 No Configuration Required.
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, set the parameters as needed and click Add.
    • URL: Enter the Internet request URL that is generated in Step 1.
    • Events: Select one or more operations as the condition for triggering an event. For example, if you select Push for this parameter, 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 a region from the drop-down list.
  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.