GitLab for Confluence offers a range of useful macros that let you seamlessly integrate GitLab information into your Confluence pages.
n this section, you'll find instructions on how to use each GitLab macro effectively within Confluence.
Viewing issues
Gitlab Issue Macro
The Gitlab Issue macro allows you to display a single issue.
-
Enter the Base URL
-
Select which Project to display the issue from
-
Use the Issue text search to search for an issue
or
Use the Gitlab Issue ID field to enter the Issue ID number -
Enable Show description to display the description of the issue
-
Enable Show comments to display any comments associated with the issue
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Gitlab Issues List Macro
The Gitlab Issues list macro allows you to display a list of macros with a project filtered by status or label.
-
Enter the Base URL
-
Select which Project to display the issue from
-
Choose with the State of the issues to be displayed e.g. Opened or Closed
-
If you wish to filter by label, add them here
-
Enable Show description to display any description present below each issue
-
Use Order by to choose if the list is ordered based on when it was created or last updated
-
Choose if the list is in Ascending or Descending order using the Sort direction field
-
Choose the Maximum numbers of entries to fetch, however please note that more than 100 entries will result in multiple api calls
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Gitlab Issues Gantt Chart Macro
-
Enter the Base URL
-
Select which Project to display information for
-
Choose whether or not you wish to display issues from a Milestone
-
From Date lets you show issues created after the selected date
-
To Date lets you show issues created before the selected date
-
Choose the Maximum Entries to display (10, 20, 50, 100, 200 or 300)
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Viewing Projects
Gitlab Project Macro
The Gitlab Project macro allows you to display detailed information about a Gitlab project.
-
Enter the Base URL
-
Select which Project to display information for
-
Choose whether or not to Show details of the project
-
Show latest build status of the project if given will display build status where available
-
Choose whether or not to Show branches
-
Choose whether or not to Show releases
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Gitlab Projects List Macro
The Gitlab Projects list macro allows you to display detailed information about multiple Gitlab projects.
-
Enter the Base URL
-
Select which Group to display Project information for
-
Use the Projects count field to limit how many projects will be displayed
-
Choose whether or not to Show details of the project
-
Show latest build status of the project if given will display build status where available
-
Choose whether or not to Show branches
-
Choose whether or not to Show releases
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Viewing Gitlab Groups
Gitlab Groups List Macro
The Gitlab Groups list macro allows you to display Gitlab groups in Confluence
-
Enter the Base URL
-
Specify which Group you wish to see or select None
-
Groups count allows you to limit how many groups are displayed
-
Show only direct groups will prevent additional tiers of sub groups from displaying
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Gitlab Epic Macro
The Gitlab Epic macro allows you to provide an overview of Gitlab Epics.
-
Enter the Base URL
-
Specify the Group with the Epic you wish to display
-
Choose the Epic to be displayed
-
Specifying the Maximum numbers of entries to fetch limits the amount of items displayed for each Epic
Viewing Development Activities
Gitlab Commit Macro
The Gitlab Commit macro allows you to display information pertaining to commits made in Gitlab
-
Enter the Base URL
-
Select the Project of the commit you wish to display the information for
-
Enter the Commit hash of the relevant commit
-
Choose to Show files associated with the commit
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Gitlab Merge Request List Macro
The Gitlab Merge Requests list macro allows you to keep track of active merge requests by display them in Confluence
-
Enter the Base URL
-
Select which Project to display the merge requests for
-
Choose whether or not to Show merged requests
-
Choose whether or not to Show closed merge requests
-
Use the Show description option if you wish to display the description of merge requests
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Gitlab Builds Macro
The Gitlab Builds macro allows you to display a list of all builds associated with a Gitlab Project
-
Enter the Base URL
-
Select which Project to display the builds for
-
The maxitemsShown option allows you to limit how many builds are displayed
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Gitlab Release Macro
The Gitlab Release macro allows you to display previous releases and their associated merge requests and commits
-
Enter the Base URL
-
Select which Project to display the releases for
-
Search for a specific release using the Tag search or leave it as The latest to display the most recent release
-
Choose whether or not to Show Merge Requests
-
Choose whether or not to Show Commits
-
Use the Commits count field to limit how many commits are displayed
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Viewing File Content and Code
Gitlab File Content Macro
The Gitlab File content macro allows you to display file content from your Gitlab repositories in Confluence
-
Enter the Base URL
-
Select which Project to display file content from
-
Use the Path to file to link to your chosen Gitlab file
-
Use the Reference name to reference a specific branch, tag or commit
-
The File type selection allows you to chose how the information is rendered
-
The Show only content option allows you to remove the border and header
-
The Hide content by default option will initially present the information minimized, with the option to click the Show button to expand the file content
-
Display file name allows you to override the default file name
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Gitlab Snippet Macro
The Gitlab Snippet macro allows you to display Gitlab snippets in Confluence
-
Enter the Base URL
-
Use snippet ID allows you to link to snippet based on its numerical ID. Note: this will remove the Project and Snippet title options
-
Select which Project to display the snippet for
-
Provide the Snippet title of the relevant snippet
-
Use the Show description option to display the description of the associated snippet
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Viewing GitLab Milestones
Gitlab Milestone Macro
The Gitlab Milestone Macro allows you to display individual milestones in Confluence
-
Enter the Base URL
-
Select which Project to display file content from
-
Select the Milestone from the drop down list, using the search bar to filter if necessary
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Gitlab Milestones Macro
The Gitlab Milestones macro allows you to display multiple milestones in Confluence
-
Enter the Base URL
-
Select which Project to display file content from
-
The State option allows you to choose the status of the Milestones e.g. active or closed
-
Search by text allows you to limit the milestones to those that match the text field
-
Maximum numbers of entries to fetch allows you to limit how many results are displayed
-
Use the refresh button to see a preview of what will be displayed once the Confluence page is published/updated then click Insert to enter the macro
Need to Integrate GitLab and Jira Data Center? Check out Jigit - GitLab integration for Jira
Updated: