fetch-github-issues

Fetch all GitHub issues for a repository

APACHE-2.0 License

Downloads
134
Stars
9
Committers
2

fetch-github-issues

Fetch all GitHub issues for a repository and save them as JSON

Installation

Install this tool using pip:

pip install fetch-github-issues

Usage

To fetch all issues from a GitHub repository:

fetch-github-issues owner/repo --all

Or for just specific issues:

fetch-github-issues owner/repo 1 2 3

Other options:

  • --key xxx: GitHub API key - will use the GITHUB_TOKEN environment variable if this is not set.
  • --output path/to/dir: Output directory to save JSON. Default is the current directory.

For more help, run:

fetch-github-issues --help

You can also use:

python -m fetch_github_issues --help

Issue format

Issues will be saved in files called 1.json and 2.json and so on, where the filename is the issue number.

Each file will look like this:

{
    "issue": {
        "GitHub API issue representation": "..."
    },
    "comments": [
        {
            "GitHub API comment representation": "..."
        }
    ]
}

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd fetch-github-issues
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest