Skip to main content
Skip table of contents

GitHub API Connection

This guide shows you how to connect GitHub to PocketQuery using the GitHub REST API.

This part just walks you through adding the data source. For the complete tutorial on showing Github issues and pull requests in Confluence, check out: GitHub PRs and Issues [REST Basic Auth]

Step 1: Create a GitHub Personal Access Token

  • Go to https://github.com/settings/tokens and create a new Personal Access Token.

  • Make sure the token has read-only permissions for the repositories or orgs you want to access.

  • Save the token securely.

Step 2: Create a Datasource in PocketQuery

Open PocketQuery Administration → Datasources, and create a new REST datasource:

Field

Value

Name

GitHub API [REST Basic]

Type

REST Basic Auth

Base URL

https://api.github.com

User

(leave empty)

Password

(paste your GitHub Personal Access Token)

Test path

/user/repos

Test the connection and save the datasource.

PocketQuery datasource configuration screen for GitHub REST API connection showing fields for base URL and test path.

Sample Use Cases

You can use the GitHub API with PocketQuery to build:

  • Sprint dashboards: Show PRs, issues, and commits by repo or label

  • Contributor boards: List top contributors per repo or org

  • Release monitors: Show GitHub Actions or workflow status

  • Security watchlists: Display Dependabot alerts across repos

🔗 Useful GitHub API Endpoints

Purpose

Endpoint

Open Pull Requests

/repos/{owner}/{repo}/pulls?state=open

Open Issues

/repos/{owner}/{repo}/issues?state=open

Filtered Issues (e.g. bugs)

/repos/{owner}/{repo}/issues?state=open&labels=bug

Commits

/repos/{owner}/{repo}/commits

Contributors

/repos/{owner}/{repo}/contributors

GitHub Actions Runs

/repos/{owner}/{repo}/actions/runs

Deployments

/repos/{owner}/{repo}/deployments

Dependabot Alerts (Repo)

/repos/{owner}/{repo}/dependabot/alerts

Dependabot Alerts (Org)

/orgs/{org}/dependabot/alerts

Org Repositories

/orgs/{org}/repos

Rate Limit (for debugging)

/rate_limit

Full documentation: GitHub REST API v3

For the complete tutorial on showing Github issues and pull requests in Confluence, check out: GitHub PRs and Issues [REST Basic Auth]

JavaScript errors detected

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

If this problem persists, please contact our support.