WebHook Setup Examples

Updated 6 months ago by Copado Solutions

GitHub

GitLab

Bitbucket

Azure (Formerly known as Microsoft VSTS)

GitHub

  1. Open your Git repository and go to 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://app-api.copado.com/json/v1/webhook/githook/event/pullrequest/provider/github/version/cloud?api_key=XXXXX (if you are using the cloud version).
      e.g.https://app-api.copado.com/json/v1/webhook/githook/event/pullrequest/provider/github/version/[version number]?api_key=XXXXX (if you are using the on-premise version).
      Please note that if you are using the on-premise option and your provider moves to a new version, you will need to update the webhook with the new version number.
    2. Content type: Select "application/json".
    3. Secret: Leave it empty.
    4. Which events would you like to trigger this webhook? Check the Let me select individual events checkbox:
    1. Then select the Pull requestPull request review and Issue comment events (leave all other deselected):
    2. 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 Webhooks.
  2. Fill in the following information on the Webhook Settings page:
    1. URL: The pull request webhook URL with your API key.
      e.g. https://app-api.copado.com/json/v1/webhook/githook/event/pullrequest/provider/gitlab/version/cloud?api_key=XXXXX (if you are using the cloud version).
      e.g.https://app-api.copado.com/json/v1/webhook/githook/event/pullrequest/provider/gitlab/version/[version number]?api_key=XXXXX (if you are using the on-premise version).
      Please note that if you are using the on-premise option, and your provider moves to a new version, you will need to update the webhook with the new version number.
    2. Secret Token: Leave it empty.
    3. Trigger: Select here Comments and Merge Request events:
  3. Once you are done, click on Add webhook:

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://app-api.copado.com/json/v1/webhook/githook/event/pullrequest/provider/bitbucket/version/cloud?api_key=XXXXX (if you are using the cloud version).
      e.g.https://app-api.copado.com/json/v1/webhook/githook/event/pullrequest/provider/bitbucket/version/[version number]?api_key=XXXXX (if you are using the on-premise version).
      Please note that if you are using the on-premise option, and your provider moves to a new version, you will need to update the webhook with the new version number.
    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 Project Settings.
  2. Next, navigate to the Service Hooks tab and click on Create subscription. 
  3. Select Web Hooks in the service configuration wizard and click on Next:

  1. Create subscriptions for all pull request triggers: Pull request created, Pull request updated, Pull requested commented on and Pull request merge attempted.
  2. Fill in the following information on each of the pull request subscriptions:
    URL: The pull request webhook URL with your API key.
    e.g. https://app-api.copado.com/json/v1/webhook/githook/event/pullrequest/provider/azure-devops/version/cloud?api_key=XXXXX (if you are using the cloud version).
    e.g.https://app-api.copado.com/json/v1/webhook/githook/event/pullrequest/provider/azure-devops/version/[version number]?api_key=XXXXX (if you are using the on-premise version).
    Please note that if you are using the on-premise option, and your provider moves to a new version, you will need to update the webhook with the new version number.


How did we do?