Skip to main content
Skip table of contents

Using GitLab Macros

Using the GitLab Macro

The GitLab macro allows you to display GitLab content directly within Confluence pages using standard GitLab URLs.

The macro automatically detects the link type and renders a rich preview for supported GitLab content.


Supported Content Types

The GitLab macro currently supports:

  • Projects

  • Merge requests

  • Issues/work items

  • Pipelines

  • Source Code

Simply paste a supported GitLab URL into the macro to display the corresponding content.


Adding the GitLab Macro

To insert GitLab content into a Confluence page:

  1. Edit a Confluence page

  2. Paste a supported GitLab URL

  3. Publish or update the page

The macro will automatically retrieve and display GitLab metadata.


Merge Requests

You can display GitLab merge requests directly within Confluence.

Example:

https://gitlab.com/group/project/-/merge_requests/1

The macro may display information such as:

  • Merge request title

  • Status

  • Author (avatar)

  • Labels

image-20260528-025746.png

Issues

You can display individual GitLab issues using a direct issue link.

Example:

https://gitlab.com/group/project/-/issues/2

The macro may display:

  • Issue title

  • Status

  • Labels

  • Assignee (avatar)

image-20260528-025900.png


Repositories (Projects)

Repository links display project-level information.

Example:

https://gitlab.com/group/project

The macro may display:

  • Project name

  • Branch count

  • Stars

  • Forks

image-20260528-030032.png

Pipelines

Repository links display project-level information.

Example:

https://gitlab.com/group/project/-/pipelines/123456789

The macro may display:

  • Pipeline number

  • Status

  • Branch

image-20260604-003318.png


Source File

Repository links display project-level information.

Example:

https://gitlab.com/group/project/-/blob/master/README.md

The macro may display:

  • File Name

  • Branch

  • Code

image-20260528-031213.png

Supported GitLab Deployments

The macro supports:

  • GitLab SaaS

  • GitLab On-Premises

For On-Premises deployments, the GitLab instance must be publicly accessible and properly configured by a Confluence administrator.


Best Practices

We recommend:

  • Using direct links to specific resources

  • Verifying repository permissions before sharing pages

  • Keeping repository URLs consistent across documentation

  • Using merge request previews in release notes and technical documentation


Common Use Cases

Teams commonly use the GitLab macro for:

Engineering Documentation

Link implementation details directly to merge requests and issues.

Release Notes

Embed completed merge requests and resolved issues.

Incident Reviews

Reference fixes, discussions, and deployment changes.

Product Planning

Connect roadmap items to GitLab issues and development work.


Troubleshooting

If the macro does not render correctly:

  • Verify the GitLab URL is valid

  • Confirm the repository is accessible

  • Check that the GitLab integration has been configured

  • Ensure the Personal Access Token is still valid

If issues persist, contact your Confluence administrator.


  • Installation & Configuration

  • Troubleshooting

  • FAQ & Support


Updated:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.