Skip to main content

Use AI to find GitHub issue's that you can work on (even if the issue's appear active)!

Project description

github-issue-prompter

Use AI to find GitHub issue's that you can work on (even if the issue's appear active)!

check code workflow release workflow

about

It can be hard to sift through open GitHub issues, especially when they seem to look busy or appear in limbo. This python utility uses AI to analyse GitHub issues, finding those that are free to work on (even if they look busy/taken at a first glance), and suggests comments to prompt the issue if it seems stale, or to offer your hand at solving it. Taking the stress out of sifting through issues yourself!

installation

Install directly from PyPI using pip:

pip install github-issue-prompter

tokens

You need a GitHub personal access token and an OpenAI API token (to use the AI functionality). You can store them in PROMPTER_GITHUB_TOKEN and PROMPTER_OPENAI_TOKEN environment variables, or pass them in as arguments.

Instructions for how to get a GitHub personal access token from your GitHub account available here.

Instructions for how to get an OpenAI API token available here.

usage

You can search for issue's across an organisation, or in a single repository. Results will be displayed along with suggested comments to get started, or you can use the post_comments argument to have comments posted automatically!

Once installed, you can either use the command line and the prompt command, with your desired arguments:

prompt -h

prompt pytorch -r pytorch

Or you can import and call the script via python:

from github_issue_prompter import prompt_issues

prompt_issues(
    organisation="pytorch",
    repository="pytorch",
)

If you don't have access to the OpenAI API, or just want more basic functionality, you can use the -s/--simple command line argument, or the mode="simple" keyword argument.

development

Fork and clone the repository code:

git clone https://github.com/itsluketwist/github-issue-prompter.git

Once cloned, install the package locally in a virtual environment:

python -m venv venv

. venv/bin/activate

pip install -e ".[dev]"

Install and use pre-commit to ensure code is in a good state:

pre-commit install

pre-commit autoupdate

pre-commit run --all-files

testing

(todo...) Run the test suite using:

pytest .

inspiration

When getting into open source, I found that plenty of issues where in uncertain states. Either assigned but seemingly inactive, or unassigned but with comments implying someone might be working on it. This made it hard to find suitable issue's to get started on, and I figured it would be convenient to have an automatic tool to scan for these issue's and prompt the assignees/maintainers to clear up the status.

todo

  • implement some tests
  • expand use-cases and instructions above
  • all api prompt config/options

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

github_issue_prompter-0.0.5.tar.gz (13.3 kB view hashes)

Uploaded Source

Built Distribution

github_issue_prompter-0.0.5-py3-none-any.whl (14.4 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