Generate a URL for opening a new GitHub issue with prefilled title, body, and other fields
Inspired by Sindre Sorhus' new-github-issue-url
from new_github_issue_url_py import IssueUrl
options = {
"user": 'YOUR_USERNAME',
"repo": 'YOUR_REPO',
"title": "The issue title",
"body": 'The issue body',
}
issue_url = IssueUrl(options)
issue_url.opn()
(Don't click the "Submit new issue" button!)
Gives a dict
Type: dict
You are required to either specify the repoUrl
option or both the user
and repo
options.
Type: string
The full URL to the repo.
Type: string
GitHub username or organization.
Type: string
GitHub repo.
Type: string
The issue body.
Type: string
The issue title.
Type: string
Use an issue template.
For example, if you want to use a template at ISSUE_TEMPLATE/unicorn.md
, you would specify unicorn.md
here.
Type: string[]
The labels for the issue.
Requires the user to have the permission to add labels.
Type: string
The milestone for the issue.
Requires the user to have the permission to add labels.
Type: string
The user to assign to the issue.
Requires the user to have the permission to add labels.
Type: string[]
The projects to add the issue to.
The project reference format is user/<project-number>
, for example, if the URL to the project is https://github.com/YOUR_USERNAME/some-repo/projects/3
, the project reference would be some-repo/3
.
Requires the user to have the permission to add labels.
Returns the last URL
Usage: print(issue_url.url)
For example: https://github.com/YOUR_USER/YOUR_REPO/issues/new?title=EXAMPLE+TITLE&body=EXAMPLE%BODY
Opens the issue URL on the new tab in your default browser.
Usage: issue_url.opn()