Include Bitbucket - Cloud ☁️

Updated documentation links

Please reference our new and improved documentation space: 

Include Bitbucket for Confluence

Include Bitbucket for Confluence Cloud provides 6 macros

to access files and more from Bitbucket Cloud and Data Center and include them into a Confluence Cloud page.

To access Bitbucket Data Center repositories, check once Configuration to Access Bitbucket Data Center Repositories.

To access private repository from Bitbucket Cloud, just add macro for private repository, a link to grant access to the repository will be displayed after publishing the page.

To add one of the Bitbucket Cloud macros for Confluence Cloud to a page:

  1. In the Confluence editor, choose Insert > Other Macros.

  2. Find and select the required macro ("External Content" category).

Speeding up macro input with auto-complete: Type /Bitbucket  or /Include to see a list of suggested macros.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the Bitbucket Cloud macro.

1. Bitbucket File: Include Bitbucket file by url

BITBUCKET CLOUD or BITBUCKET DATA CENTER / SERVER

This macro allows the user to include a file from a Bitbucket DC/Server or Cloud repository in order to have an up-to-date version of it in a Confluence page.

 

Paste a Bitbucket file URL directly into the Confluence page editor.

Note: Copy the file URL from you browser and paste it into the URL field.

 

You can also export your files to PDF or Word

 

 

Alternatively, type /Include Bitbucket File and ENTER to specify the details of this macro like the url of the file, syntax highlighting, title and line numbers.

 

2. Bitbucket Pull Requests: Bitbucket Cloud Pull Requests

This macro shows pull requests for a Bitbucket Cloud repository. 

Type /Include Bitbucket Pull Requests and ENTER to specify the details of this macro.

Example:

Per default, only all open pull requests are shown. A query can be added to specify the macro. Ensure you tab out of the search query to ensure that the data refreshes.

Examples:

  • state="MERGED" AND reviewers.username="diego" AND destination.branch.name = "master"

  • state = "OPEN" AND author.username ~ "diego"

See filtering syntax here: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering.

3. Bitbucket Commits: Bitbucket Cloud commits

This macro shows commits for a Bitbucket Cloud repository. 

Type /Include Bitbucket Commits and ENTER to specify the details of this macro.

Example:

A query can be added to filter the commits by file or branch.  Ensure you tab out of the search query to ensure that the data refreshes.

Examples:

  • exclude=master

  • path=package.json&exclude=master

  • page=1&pagelen=5 or pagelen=5

See Bitbucket API documentation here: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-commit-commit-comments-comment-id-get

4. Bitbucket Branches: Bitbucket Cloud branches

This macro shows branches for a Bitbucket Cloud repository. 

Type /Include Bitbucket Branches and ENTER to specify the details of this macro.

Example:



A query can be added to filter the branches by name.  Ensure you tab out of the search query to ensure that the data refreshes.

Examples:

  • name="master"

  • name~"foo"

See filtering syntax here: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering.

5. Bitbucket Tags: Bitbucket Cloud tags

This macro displays git tags for a Bitbucket Cloud repository. 

Type /Include Bitbucket Tags and ENTER to specify the details of this macro.

Example:

 

A query can be added to filter the tags by name.  Ensure you tab out of the search query to ensure that the data refreshes.

Examples:

  • name="version"

  • name~"beta"

See filtering syntax here: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering .

6. Bitbucket Issues: Bitbucket Cloud open issues

This macro shows issues for a Bitbucket Cloud repository. 

Type /Include Bitbucket Issues and ENTER to specify the details of this macro.

Example:

A query can be added to specify the macro. Ensure you tab out of the search query to ensure that the data refreshes.

See filtering syntax here: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering.

Examples:

  • state="new"

  • assignee.username = "diego" 

Note: It is useful to copy/paste the team name and the repository name from the repository url



On this page: