Kore.ai provides integration for a built-in Bitbucket Bot that you can use to display message notifications and execute tasks directly from your messaging channel such as Kore.ai Messenger. To use the Bitbucket Bot, you just need to add the Bot to your channel and then configure the settings for the Bot, such as authentication to access Bitbucket and the notification messages that you want. For more information about other Kore.ai Bots, see Adding Bots

About the Kore.ai Bot for Bitbucket

DIYBitbucketLogoBitbucket is a web-based hosting service for software projects that use the Mercurial or Git revision control systems. You can use this Bot to manage Issues and get updates on pull requests, commits, issues and repositories.

Integration Type Web Service – Connect to this Bot using a web service integration where Kore.ai polls the service for updates based on a specified interval.
Webhook – Connect to this Bot using a webhook integration where the web application pushes message notifications in near real time.
Category Developer Tools – This Bot is available in the Kore.ai Bot Store in the Developer Tools category.
Channels Kore.ai – This Bot is available in the Kore.ai Messenger application.
Email – This Bot is available using an email client.
Spark – This Bot is available in the Cisco Spark messaging application.
Slack – This Bot is available in the Slack messaging application.
Skype – This Bot is available in the Skype messaging application.

Configuring Bitbucket

To configure a Bitbucket webhook for Kore.ai, you must have a Bitbucket account with administrator access as well as API access to configure a webhook. If you don’t, you’ll need to contact the Bitbucket system administrator for your company. For more information, see the Bitbucket Cloud Documentation Home.
To get started configuring the webhook in Bitbucket, you’ll need two things:

  1. The Kore.ai webhook URL provided when you set up an alert in your messaging channel for each alert that you want to enable in Bitbucket.
  2. A valid Username and Password for an account with Bitbucket API access.

The webhook URL is account-specific and cannot be transferred to any other account. This means that if you configure a Bitbucket webhook using a test account, you will have to recreate the alert and get a new webhook URL to configure in Bitbucket. The following URL is an example webhook URL.
https://company.kore.com/hooks/c6089802f36250c179dcb1aa29afd24c

Configuring Webhook Tasks

This procedure describes the steps in Bitbucket to configure a webhook using a Kore.ai webhook URL endpoint.

  1. Log on to Bitbucket and on the Dashboard page, click the repository that you want to add a webhook to.
  2. In the NAVIGATION section on the lefthand side Navigation menu, click Settings.
  3. On the Settings menu, in the WORKFLOW section, click Webhooks.
  4. On the Webhooks page, click Add webhook. The Add new webhook page is displayed.
  5. In the Title field, enter a name for your webhook to be used in the Bitbucket application.
  6. In the URL field, enter the Kore.ai webhook URL for the alert.
  7. In the Triggers section, select the events that you want to receive as Kore.ai alerts, and then click Save.

For more information, see Manage Webhooks in the Bitbucket documentation.
To setup real-time notifications in your messaging channel using a Bitbucket webhook, for example, in the Kore.ai Messenger channel, click the New Task icon, click Get notified when…, click Repository Updates, and then in the Setup Task dialog:

  • click the Activate button to generate a Webhook URL.
  • copy and save the URL, or click Email Instructions to send the URL to an email account. For more information, see Configuring Bitbucket Webhooks.
  • optionally customize the Task Name 
  • optionally customize the Short Description
  • enable or disable Mute task notifications
  • and then click Submit.

Configuring Web Service Tasks

To configure web service tasks, you need to add the Bitbucket Bot from the Kore.ai Bot Store in your messaging channel, and then setup the task. To setup a Bitbucket task, click Connect to Bitbucket ,enter the Bitbucket URL for your company, your Bitbucket account user name (not your email address), and your password.
After you add a web service task and are connected, you can perform tasks for Bitbucket and setup message notifications to get notified in your messaging channel when an event occurs in Bitbucket. To setup an Bitbucket task in the Kore.ai Messenger channel, click the New Task icon, and then click one of the Bitbucket web services described in the following table.

TASK TO CONFIGURE THIS TASK…
Comment Issue In the Perform Task dialog,

  • select a Repository
  • search an Issue to comment on
  • enter a comment in the Content section
  • and then click Submit.

In a team room, you can enter the @bitbucket commentissue Bot command to invoke and configure this task.

Create Issue In the Perform Task dialog,

  • select a Repository
  • enter a Title for the issue
  • optionally enter a Description
  • select a Status
  • select a Priority
  • select an Issue Type
  • and then click Submit.

In a team room, you can enter the @bitbucket createissue Bot command to invoke and configure this task.

To setup a Bitbucket task in the Kore.ai Messenger channel, click the New Task icon, click Get notified when…, and then click one of the Bitbucket web services described in the following table.

TASK TO CONFIGURE THIS TASK…
Pull Request Notification In the Setup Task dialog,

  • select a Repository
  • optionally customize the Task Name 
  • optionally customize the Short Description
  • enable or disable Mute task notifications
  • optionally customize the interval for message notifications in the Check for updates… section
  • and then click Finish.
Pull Request Accepted In the Setup Task dialog,

  • select a Repository
  • optionally customize the Task Name
  • optionally customize the Short Description
  • enable or disable Mute task notifications
  • optionally customize the interval for message notifications in the Check for updates… section
  • and then click Finish.
Issue Assigned In the Setup Task dialog,

  • select a Repository 
  • optionally customize the Task Name
  • optionally customize the Short Description
  • enable or disable Mute task notifications
  • optionally customize the interval for message notifications in the Check for updates… section
  • and then click Finish.
Pull Request Rejected In the Setup Task dialog,

  • select a Repository  
  • optionally customize the Task Name
  • optionally customize the Short Description
  • enable or disable Mute task notifications
  • optionally customize the interval for message notifications in the Check for updates… section
  • and then click Finish.
Commit Alert In the Setup Task dialog,

  • select a Repository  
  • optionally customize the Task Name
  • optionally customize the Short Description
  • enable or disable Mute task notifications
  • optionally customize the interval for message notifications in the Check for updates… section
  • and then click Finish.
Issue Created In the Setup Task dialog,

  • select a Repository  
  • optionally customize the Task Name
  • optionally customize the Short Description
  • enable or disable Mute task notifications
  • optionally customize the interval for message notifications in the Check for updates… section
  • and then click Finish.

Next Steps

After the webhook is configured in Bitbucket, when any of the events occur in Bitbucket, a message is displayed on the Bots page in Kore.ai Messenger or your messaging channel.