Skip to main content

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

Project description

fetch-github-issues

PyPI Changelog Tests License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fetch_github_issues-0.1.1.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

fetch_github_issues-0.1.1-py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page