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: |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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:
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 /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.webmNote: 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.
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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.webmA 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.webmA 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 | ||||
---|---|---|---|---|
| ||||
|