WebHook Setup Examples

Updated 3 months ago by Copado Solutions

GitHub

GitLab

Bitbucket

Azure (Formerly known as Microsoft Vsts)

GitHub

  1. Open your Git Repository and click on the Settings tab (if you do not see Settings, please get in touch with your admin). 
  2. Click on the Webhooks menu item and then on Add Webhook.
  3. Fill in the following information on the webhook configuration page:
    1. Payload URL: The Pull Request Webhook URL with the base URL of the Org where Copado is installed and your API Key.
      e.g. https://copado.herokuapp.com/json/v1/webhook/pullRequest?api_key=XXXXX
      e.g. https://app-api.copa.do/json/v1/webhook/pullRequest?api_key=XXXXX (if you have installed Summer '19 from scratch).
    2. Content Type: Select "application/json".
    3. Secret: Leave it empty.
    4. For which events would you like to trigger this webhook?: Click on the Let me select individual events checkbox.
    5. Then select the Pull requestPull request review and Issue comment events (leave all other deselected). 
    6. Leave the Active checkbox selected and then click on Add webhook.

GitLab

  1. Set up a new repository webhook on GitLab. To do so open the Settings menu of your repository and click on Integrations to open the Integrations Settings page.
  2. Fill in the following information on the Integrations Settings page and click on Add webhook:
    1. URL: The Pull Request Webhook URL with your API key.
      e.g. https://copado.herokuapp.com/json/v1/webhook/pullRequest?api_key=XXXXX
      e.g. https://app-api.copa.do/json/v1/webhook/pullRequest?api_key=XXXXX (if you have installed Summer '19 from scratch).
    2. Secret Token: Leave it empty.
    3. Trigger: Select here Comments and Merge Request events.

BitBucket

  1. Set up a new repository webhook on BitBucket. To do so, head over to the page of your repository and go to Settings. Then, go to Webhooks > and click on Add webhook. 
  2. Fill in the following information on the webhook Settings page and click on Save to save the Webhook:
    1. URL: The Pull Request Webhook URL with your API key.
      e.g. https://copado.herokuapp.com/json/v1/webhook/pullRequest?api_key=XXXXX
      e.g. https://app-api.copa.do/json/v1/webhook/pullRequest?api_key=XXXXX (if you have installed Summer '19 from scratch).
    2. Status: Active.
    3. Triggers: Select here Choose from a full list of triggers and select all the Pull Request events.

Azure

  1. Set up a new Service Hook for the repository. To do so, head over to the page of your repository and click on the Service Hooks tab. After that, click on Create Subscription. 
  2. Select Web Hooks in the Service configuration wizard and follow it to create a new subscription for the Pull Request Webhook URL .
  3. Create Subscriptions for all the Pull Request Triggers: Pull Request createdPull Request updated and Pull Request merge commit created.


How did we do?