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 spaces: 

Include GitHub for Confluence 

Info

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

Include GitHub for Confluence Cloud provides a File, Pull Requests & Issues Macro

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

1. Macro "GitHub File": Include GitHub Cloud file by url

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

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

Screen Recording 2022-08-18 at 15.20.25.mov

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

Image RemovedImage Added

Alternatively, you can also paste a GitHub file URL directly into the Confluence page editor.

Screen Recording 2022-08-18 at 15.23.31.mov
Panel
panelIconId2b50
panelIcon:star:
panelIconText
bgColor#DEEBFF

You can also export your files to PDF or Word

2. Macro "GitHub Pull Requests": Include GitHub Cloud pull requests with the repo path

This macro allows the user to include pull requests from a GitHub repository. Type /GitHub Pull Requests and ENTER to specify the details of this macro like the repo path (e.g.owner/repo or https://github.com/owner/repo).

Screen Recording 2022-09-01 at 11.09.34.mov

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.github.com/en/rest/pulls/pulls#list-pull-requests .

Examples:

  • base=target-branch-name&state=closed

  • state=closed&sort=created&direction=desc

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

Image Added

3. Macro "GitHub Issues": Include GitHub Cloud issues with the repo path

This macro allows the user to include issues from a GitHub repository. Type /GitHub Issues and ENTER to specify the details of this macro like the repo path (e.g.owner/repo or https://github.com/owner/repo).

Screen Recording 2022-09-01 at 11.05.47.mov

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.github.com/en/rest/search#search-issues-and-pull-requests .

Examples:

  • state:closed

  • state:open&sort=created&order=desc

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

Image Added
Panel
borderStylesolid
titleOn this page:
Table of Contents