GH Issues is a wrapper for the GitHub API Issues Endpoint that makes it easy to work with a Github Issue's body as a Python object.
pip install gh-issues
from gh_issues import Repo, Issue
repo = Repo(
owner="python-community-news", repo="gh-issues"
)
issue = Issue(repo=repo, issue_number=1)
If the issue text is
# Issue Header
This is some text
the issue would be represented as
issue.issue_header
>>> "This is some text"
Nested issues are supported. If the issue text is
# Issue Header
This is some text referencing issue #2
You can access the issue referenced by the issue
for issue in Issue.get_content_issues('issue_header'):
print(issue.issue_header)
>>> <Issue - #2: This is the issue #2 Title by @user>
Review the Contributing Guidelines for information on how to contribute to this project.
This project is licensed under the terms of the MIT License.
This project is governed by the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to kjaymiller@gmail.com