Skip to content

Bitbucket

The Bitbucket modules enable you to monitor repositories, users or teams, and create, update, retrieve, or delete issues, snippets or milestones in your Bitbucket account.

Getting Started with Bitbucket

Prerequisites

  • A Bitbucket account

In order to use Bitbucket with Ibexa Connect, it is necessary to have a Bitbucket account. If you do not have one, you can create a Bitbucket account at bitbucket.org/account/signup.

Note

The module dialog fields that are displayed in bold (in the Ibexa Connect scenario, not in this documentation article) are mandatory!

Connecting Bitbucket to Ibexa Connect

To connect your Bitbucket account to Ibexa Connect follow the general instructions for Connecting to services.

After you click the Continue button, Ibexa Connect will redirect you to the Bitbucket website where you will be prompted to grant Ibexa Connect access to your account.

61f267e30f9f7.png

Confirm the dialog by clicking the Grant Access button.

Watch

Watch Repository

Triggers when specified events occur in the repository.

Required Permissions: webhook, repository, pullrequest, issue

Webhook name Enter the name for the webhook. E.g. New Issue.
Repository Select the repository you want to watch for events.
Events Choose the Bitbucket events that will trigger the module.

You can check that the webhook was created in the repository settings of your Bitbucket account.

61f267e453459.gif

Watch a User

Triggers when the specified event occurs in all repositories that belong to your account. Creates a new webhook for the specified user account.

Required Permissions: webhook, repository, pullrequest, issue

Note

One can only register webhooks on one's own account, not that of others.

Webhook name Enter the name for the webhook. E.g. New Issue.
Events Choose Bitbucket events that will trigger the module.

Watch a Team

Triggers when the specified event occurs in all repositories that belong to the selected team.

Required Permissions: webhook, repository, pullrequest, issue

Note

Only admins can install webhooks on teams.

Webhook name Enter the name for the webhook. E.g. New Issue.
Team Select the team you want to monitor events for.
Events Choose Bitbucket events that will trigger the module.

Issue

Create an Issue

Creates a new issue.

Required Permissions: issue:write

Note

The authenticated user is used in the issue's reporter field in the issue's details (Bitbucket UI).

Caution

The issue tracker must be enabled to use this module. Please follow the instructions for Enable an issue tracker.

Note

The authenticated user must be the collaborator of the selected repository.

Repository Select the repository where you want to create a new issue.
Title Enter the title of the issue.
Raw Enter the description of the issue.
Markup Select the markup language you want to use to format the issue description.
Kind Select whether the issue is a bug, enhancement, proposal, or task.
Priority Set the issue priority.
Username Enter the user name of the user you want to assign the issue to.

The user name can be found in the user profile settings. https://bitbucket.org/account/user/{{username}}

61f267e76659d.png
State Select the state of the issue.
Component A component as defined in the repository's issue tracker.
Milestone A milestone as defined in the repository's issue tracker.
Version A version as defined in the repository's issue tracker.

Get an Issue

Retrieves the details of an issue.

Required Permissions: issue

Repository Select or map the repository that contains the issue you want to retrieve.
Issue ID Enter (map) or select the issue you want to retrieve details about.

List Issues

Retrieves all issues within the selected repository.

Required Permissions: issue

Repository Select or map the repository you want to retrieve issues from.
Limit Set the maximum number of issues Ibexa Connect will return during one execution cycle.

Update an Issue

Updates the specified issue.

Required Permissions: issue:write

Repository Select or map the repository that contains the issue you want to update.
Issue ID Enter (map) or select the issue you want to update.

Please find the descriptions of the fields in the Create an Issue section above.

Delete an Issue

Deletes a specified issue.

Required Permissions: issue:write

Repository Select or map the repository that contains the issue you want to delete.
Issue ID Enter (map) or select the issue you want to delete.

Create an Issue Comment

Adds a comment to the issue.

Required Permissions: issue:write

Repository Select or map the repository that contains the issue you want to add a comment to.
Issue ID Enter (map) or select the issue you want to add a comment to.
Raw Enter the text content of the comment.
Markup Specify the markup you want to use for formatting the comment.

Milestone

List Milestones

Retrieves all milestones within the specified repository.

Required Permissions: issue

Repository Select or map the repository you want to retrieve milestones from.
Limit Set the maximum number of milestones Ibexa Connect will return during one execution cycle.

Get a Milestone

Retrieves milestone details.

Required Permissions: issue

Repository Select or map the repository that contains the milestone you want to retrieve.
Issue ID Enter (map) or select the milestone you want to retrieve details about.

List Repository Watchers

Returns a list of all the watchers of the specified repository.

Required Permissions: repository

Repository Select or map the repository you want to retrieve repository watchers from.
Limit Set the maximum number of repository watchers Ibexa Connect will return during one execution cycle.

File

Get a File

Downloads a file from the repository.

Required Permissions: repository

Repository Select or map the repository that contains the file you want to download.
File Name Enter the file name of the file you want to download.

Snippet

List Snippets

Retrieves all snippets for the specified user.

Required Permissions: snippet

User Name

Select or map the user name you want to retrieve snippets for.

Role

Select your role to filter returned snippets.

  • owner: all snippets owned by the current user

  • contributor: all snippets owned by, or watched by the current user

  • member: owned by the user, their teams, or watched by the current user

When no role is specified, all public snippets are returned, as well as all privately owned snippets watched or commented on.

Limit

Set the maximum number of snippets Ibexa Connect will return during one execution cycle.

Get a Snippet

Retrieves the details of a snippet.

Required Permissions: snippet

User Name Select or map the user or team name the snippet you want to retrieve belongs to.
Snippet ID Enter (map) or select the ID of the snippet you want to retrieve details about.

Start Watching a Snippet

Starts watching the specified snippet.

Required Permissions: snippet:write

User Name Select or map the user name associated with the snippet.
Role Select your role for the snippet.
Snippet ID Enter (map) or select the ID of the snippet you want to start watching.

Stop Watching a Snippet

Stops watching the specified snippet.

Required Permissions: snippet:write

User Name Select or map the user name associated with the snippet.
Role Select your role for the snippet.
Snippet ID Enter (map) or select the ID of the snippet you want to stop watching.

List Snippet Watchers

Retrieves all users that are watching a specified snippet.

Required Permissions: snippet

Snippet ID Enter (map) or select the ID of the snippet you want to retrieve users from.
Limit Set the maximum number of users Ibexa Connect will return during one execution cycle.

Create a Comment on a Snippet

Adds a comment to the specified snippet.

Required Permissions: snippet

User Name Select or map the user name.
Snippet ID Enter (map) or select the snippet you want to add a comment to.
Raw Enter the text content of the comment.
Markup Specify the markup you want to use for formatting the comment.
Comment ID If you want to post your comment as a reply, enter (map) the comment you want to reply to.

Make an API Call

Allows you to perform a custom API call.

URL

Enter a path relative to https://api.bitbucket.org/2.0/. E.g. teams

For the list of available endpoints, refer to the Bitbucket API docs.

Method

Select the HTTP method you want to use:

GET

to retrieve information for an entry.

POST

to create a new entry.

PUT

to update/replace an existing entry.

PATCH

to make a partial entry update.

DELETE

to delete an entry.

Headers

Enter the desired request headers. You don't have to add authorization headers; we already did that for you.

Query String

Enter the request query string.

Body

Enter the body content for your API call.

Example of Use - List Teams

The following API call returns the list of all teams where your role is admin:

URL: teams

Query String

Key: roleValue: admin

61f267e896952.png

Matches of the search can be found in the module's Output under Bundle > Body > values.

In our example, 2 teams were returned:

61f267e99269c.png