Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Updated documentation links

Please reference our new and improved documentation space: 

Include GitLab for Confluence

Panel
panelIconId1f5c3
panelIcon:card_box:
panelIconText🗃
bgColor#DEEBFF

You can include content from private GitLab projects / repos too. Once private links are added, the OAuth process will follow.

Include GitLab for Confluence Cloud provides a File, Issue and Pull Request Macro

To add the GitLab 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 /GitLab  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 GitLab Cloud macro.

1. Macro "GitLab File": Include GitLab Cloud file by URL

This macro allows the user to include a file from a GitLab repository in order to have an up-to-date version of it in a Confluence page.

Type /GitLab File and ENTER to specify the details of this macro like the url of the file, syntax highlighting, title and line numbers.

git-lab.webm

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

Alternatively, you can also paste a GitLab file URL directly into the Confluence page editor. Note: Pasting only works for gitlab.com files.
For GitLab files on other domains use the GitLab macros explicitly.

git-lab-paste.webm
Panel
panelIconId2b50
panelIcon:star:
panelIconText
bgColor#DEEBFF

You can also export your files to PDF or Word

2. Macro "GitLab Pull Requests": Include GitLab Cloud pull requests with the project URL

This macro allows the user to include pull requests (also known as merge requests) from a GitLab project / repository. Type /GitLab Pull Requests and ENTER to specify the details of this macro like the project url (e.g. https://gitlab.com/<orgname>/<projectname> or https://gitlab.mycompany.com/<orgname>/<projectname>).

gitlab-pull-requests.webm

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://docs.gitlab.com/ee/api/merge_requests.html#list-project-merge-requests .

Examples:

  • labels=bug

  • author_username=gitlab-bot 

Note: Navigate to the projects main page, then copy the project url

3. Macro "GitLab Issues": Include GitLab Cloud issues with the project URL

This macro allows the user to include issues from a GitLab project / repository. Type /GitLab Issues and ENTER to specify the details of this macro like the project url (e.g. https://gitlab.com/<orgname>/<projectname> or https://gitlab.mycompany.com/<orgname>/<projectname>).

gitlab-issues.webm

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://docs.gitlab.com/ee/api/issues.html#list-project-issues .

Examples:

  • state=closed

  • labels=foo 

Note: It is useful to copy/paste the project path from the project url


Panel
borderStylesolid
titleOn this page:
Table of Contents