GitHub Repo Backend
Path: issues.backends.github_repo.Backend
The GitHub Repo backend creates an issue in a specified GitHub repository and uploads screenshots to the repository.
Note
This backend require the public_repo
permission granted to the token
Options:
-
API_TOKEN: Your GitHub personal access token with
public_repo
scope for public repositories, orrepo
scope for private repositories. -
PROJECT: The username or organization and project name repository.
-
SCREENSHOT_REPO_PATH: The path in the repository where screenshots will be stored.
-
SCREENSHOT_BRANCH: The branch where screenshots will be stored.
Example:
# settings.py
ISSUES = {
"BACKEND": "issues.backends.github_repo.Backend",
"OPTIONS": {
"API_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"PROJECT": "user/repo",
"SCREENSHOT_REPO_PATH": "screenshots/",
"SCREENSHOT_BRANCH": "main",
}
}
How to configure your token
1) Classic Personal Access Token (PAT)
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic).
- Click Generate new token → Generate new token (classic).
- Give it a descriptive note and set an expiration date.
-
Under Select scopes, check:
- repo → this covers both public and private repositories.
- If you only want public repositories, you can instead check public_repo.
-
Click Generate token.
-
Copy the token (you won’t be able to see it again).
In this case, the public_repo scope will appear explicitly in the list.
2) Fine-grained Personal Access Token
- Go to GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens.
- Click Generate new token.
- Choose:
- Resource owner (your account or organization).
- Repository access → pick All repositories or specific ones.
-
Under Repository permissions, set the level you need.
-
Click Generate token.