Skip to main content
Skip table of contents

Include pull requests list ☁️

You can include information on pull requests from a GitHub repository by adding lists of pull requests in your Confluence page. For each pull request you will get the name, branch, author, id and last updated information.


Add the macro

You can add the macro either by:

  • typing directly /Github Pull Requests and ENTER to add and edit the macro, or

  • using the Insert button from the editor toolbar and then picking the Github Pull Requests macro from the “External Content” category of the macro library.

You will then be prompted to specify the following:

Project path

path to the repository

Can be either the relative path (e.g. owner/repo) or the absolute path (e.g https://github.com/owner/repo)

Search query (optional)

Query used to filter and sort the list of pull requests. Check out the section below for more information on querying.

Example of including a list of pull request from github


Query specific sets of pull requests

As mentioned above you can add a query option to the macro to display a specifically filtered and sorted list of pull requests.

Example of filtering and sorting a list of pull requests

The filtering syntax supported by the Github API is available in their documentation here: https://docs.github.com/en/rest/pulls/pulls#list-pull-requests

Examples:

List all closed pull requests for which the base branch was target-branch-name

base=target-branch-name&state=closed

List all closed pull requests and sort them in descending order by their creation date.

state=closed&sort=created&direction=desc

When adding search queries you can run the query and preview results simply by clicking out of the search query input field.

JavaScript errors detected

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

If this problem persists, please contact our support.