Include Bitbucket - Data Center
Updated documentation links
Please reference our new and improved documentation spaces:
Include Bitbucket for Confluence needs an application link from Confluence to Bitbucket Server in order to communicate between these two applications. Go to the Configuration page for more information.
Include Bitbucket for Confluence provides 6 macros for Confluence to access files and statistics from Bitbucket and to include them into a Confluence page.
To add one of the Bitbucket macros for Confluence to a page:
In the Confluence editor, choose Insert > Other Macros.
Find and select the required macro ("External Content" category).
Speeding up macro input with auto-complete: Type { Include or { Bitbucket 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 macro.
Bitbucket include by file path
This macro allows to include a file from a Bitbucket repository to always have an up-to-date version of it in a Confluence page.
Type { Include by file path and ENTER to specify the details of this macro like the project, repository, branch and the path to the file.
Include Bitbucket for Confluence will recognize the used programming language and will render it syntax highlighted.
Note that Markdown and AsciiDoc text files are also recognized and will be rendered as HTML.
Example:
You can also just paste a Bitbucket file URL into the Confluence editor and the app will automatically transform it to the macro:
In addition, you can copy and paste a file with file ranges and it works. (i.e. https://filepath.scala#27-32 )
Bitbucket include by Ant glob pattern bITBUCKET DATA CENTER / SERVER
This macro allows to include a configurable number of matching files by an Ant glob pattern from a Bitbucket Data Center / Server repository to always have up-to-date versions of them in a Confluence page.
Type { Include by Ant glob pattern and ENTER to specify the details of this macro.
Configuration parameters are the project, repository, branch, an Ant glob pattern (see here for its syntax) and the number of matching files to include into the Confluence page.
Include Bitbucket for Confluence will recognize the used programming language and will render it syntax highlighted.
Note that Markdown files (e.g., README.md) are also recognized and will be rendered as HTML.
Example:
Bitbucket open pull requests
This macro shows a configurable number of open pull requests for a Bitbucket repository.
Type {Include open pull requests and ENTER to specify the details of this macro.
Example:
Bitbucket branches
This macro shows a configurable number of branches for a Bitbucket Server repository.
Type {Include branches and ENTER to specify the details of this macro. Note that the default branch of this Bitbucket repository has a star icon.
Example:
Bitbucket commits
This macro shows a configurable number of recent commits for a configurable branch of a Bitbucket repository.
Type {Include commits and ENTER to specify the details of this macro.
Example:
Bitbucket tags
This macro shows a list of tags for Bitbucket repository.
Type {Include tags and ENTER to specify the details of this macro.
Example: