---
title: "Configuring Github Macros for Confluence (Cloud)"
canonical: "https://support.appfire.com/space/GMFC/150241327/Configuring%20Github%20Macros%20for%20Confluence%20(Cloud)"
format: markdown
---
> Macro (aura-html)

## Macro to include code snippets, files, issues, and more from Github into Confluence

# Features

- Include and render files from Github into Confluence.
- Include issue lists from Github into Confluence.
- Include pull request lists from Github into Confluence.
- Support for both private and public repositories.

# Configuration

Go to the app configuration page to add a Github token. To do so, you can perform either of the following actions:

- Navigate to ***Settings > Manage apps > Github Macros for Confluence***. Then, click **Configure** to open the app configuration page.
- Or, select *Github Macro for Confluence Configuration* under Atlassian Marketplace in the panel on the left.

![image](media://d81a9639-8e24-484c-9810-33bebea944bc)

Enter a name for the token and click **Create new Link**. An intermediate page <span style="color: #003366">is then displayed</span><span style="color: #000000">.</span>

![image](media://361dc2e7-b6ce-401c-a723-5a36192229e1)

Check the address of the Atlassian cloud instance and token name. After verifying the details, press **Start workflow**. You are then redirected to the Github authorization page.

![image](media://84cc0367-8a09-4b2d-8754-201ba3f29409)

  


Click A**uthorize** and the token page is now displayed. After the authentication is completed, you can enter the number or a number range of the code lines to be displayed in the *Github File* macro. 

> ⚠️ **About the Limit the number of lines parameter:**
> ⚠️ 
> ⚠️ - If you want to display only certain lines of code, specify the limit of the code lines to be displayed and click **Submit**. You can specify range or number of maximum lines to be displayed. For example: `5`, `2-25`.
> ⚠️ - This parameter in the global configuration page is applicable only for the *Github File* macro.
> ⚠️ - You can hide the line numbers displayed in code block. To hide go to *GitHub file macro* and select the *Hide line numbers of code block** *checkbox.
> ⚠️ - The *Limit the number of lines* parameter set in the macro editor has higher precedence than the global configuration parameter. Thus, the parameter behaves as follows:

You are now ready to get started with the macro!

<span style="color: #172B4D">Refer to the</span><span style="color: #008000"> </span>[<span style="color: #008000">Macros</span>](https://appfire.atlassian.net/wiki/x/-AYUKg)<span style="color: #008000"> </span><span style="color: #172B4D">page to learn more about the macros.</span>