How to create a GitHub links macro in Confluence Data Center?
Get to know the easiest way to create a GitHub link macro.
GitHub links for Confluence (Data Center) provide link recognition of the GitHub public and private pull requests and issues. Gain better visibility and traceability of important issues and milestones with embedded GitHub data.
Confluence GitHub integration is realised with GitHub links macro help.
Create GitHub macro links
There are two ways to create GitHub macro links.
When editing your confluence page, click drop down
then select “Other macros” as shown below:
![image-20240517-081327.png](../__attachments/2469855233/image-20240517-081327.png?inst-v=c348097f-f81a-48d2-867e-cbe7adf7c9cb)
This will bring up the “Select Macro” window. From here, search for GitHub Links” as shown below and select it:
![image-20240517-081410.png](../__attachments/2469855233/image-20240517-081410.png?inst-v=c348097f-f81a-48d2-867e-cbe7adf7c9cb)
For the second option, when editing your confluence page, type
{github
where you like the link to be pasted and select “GitHub Links” from the “Macro suggestions” pop up as shown below:
![image-20240517-081507.png](../__attachments/2469855233/image-20240517-081507.png?inst-v=c348097f-f81a-48d2-867e-cbe7adf7c9cb)
Either of the two options will bring you to the following window:
![image-20240517-081555.png](../__attachments/2469855233/image-20240517-081555.png?inst-v=c348097f-f81a-48d2-867e-cbe7adf7c9cb)
Enter the URL or the issues or pull requests, this can be individual issues/pull requests or full directories, which will then be populated. The button will show the populated data prior to inserting it.
![image-20240517-081745.png](../__attachments/2469855233/image-20240517-081745.png?inst-v=c348097f-f81a-48d2-867e-cbe7adf7c9cb)
The GitHub links macro will show the status and any labels assigned within your GitHub repositories.
![image-20240517-081816.png](../__attachments/2469855233/image-20240517-081816.png?inst-v=c348097f-f81a-48d2-867e-cbe7adf7c9cb)
GitHub links can also be used in page comments.
![image-20240517-081849.png](../__attachments/2469855233/image-20240517-081849.png?inst-v=c348097f-f81a-48d2-867e-cbe7adf7c9cb)
Creating a GitHub Links Macro for all pull requests or issues in a repository, ensures any new items added, will be automatically added to your Confluence page providing a convenient overview with a simple page refresh.
Updated: