Skip to main content

An AI-based assistant for handling github issues and pull-requests

Project description

git-bob

git-bob uses AI to answer Github-issues and review pull-requests.

demo_fix_typos.png

Under the hood it uses claude 3.5 sonnet or gpt-4 omni to understand the text and pygithub to interact with the issues and pull-requests.

Disclaimer

git-bob is a research project aiming at streamlining Github interaction in software development projects. Under the hood it uses artificial intelligence / large language models to generate text and code fulfilling the user's requests. Users are responsible to verify the generated code according to good scientific practice.

When using git-bob you configure it to use an API key to access the AI models. You have to pay for the usage and must be careful in using the software. Do not use this technology if you are not aware of the costs and consequences.

[!CAUTION] When using the OpenAI, Google Gemini, Anthropic or any other endpoint via git-bob, you are bound to the terms of service of the respective companies or organizations. The prompts you enter are transferred to their servers and may be processed and stored there. Make sure to not submit any sensitive, confidential or personal data. Also using these services may cost money.

Installation as Github action

To use git-bob in your Github repository, you need to

  • setup Github workflows like shown in this folder.
    • Make sure to replace pip install -e . with a specific git-bob version such as pip install git-bob==0.1.0.
    • Configure the LLM you want to use in the workflow files by specifying the GIT_BOB_LLM_NAME environment variable.
  • configure a Github secret called ANTHROPIC_API_KEY or an OPENAI_API_KEY depending on the above configured LLM.
  • configure Github actions to run the workflow on issues and pull-requests. Also give write-access to the action runner.

To trigger git-bob, you need to comment on an issue or pull-request with the following command:

git-bob comment

When using openai/gpt-4-omni, you can also use the following command to trigger git-bob. It will then try to solve the issue and send a pull-request.

git-bob solve

Note: This will only work with simple issues that can be solved by modifying a single file.

Use-case examples

demo_fix_typos.png

demo_fix_typos.png

  • git-bob can review pull-requests and provide feedback (pull-request):

demo_fix_typos.png

  • git-bob can also be exploited to answer questions (issue).

Installation as command-line tool

You can also install git-bob locally and run it from the terminal. In this case, create a Github token and store it in an environment variable named GITHUB_API_KEY. Also create an environment variable GIT_BOB_LLM_NAME with the name of the LLM you want to use, e.g. "gpt-4o-2024-05-13" or "claude-3-5-sonnet-20240620". Then you can install git-bob using pip:

pip install git-bob

Usage as command-line tool

You can then use git-bob from the terminal on repositories you have read/write access to.

git_bob <action> <organization>/<repository> <issue-number>

Available actions:

  • review-pull-request
  • comment-on-issue
  • solve-issue (only works with OpenAI/gpt-4-omni at the moment)

Limitations

  • git-bob was tested for Python projects only (yet).
  • It cannot solve issues where changing multiple files is required.
  • It does not have any logic to control who is allowed to trigger it. It uses Github infrastructure instead. Hence, if you are a repository member, you can trigger it. If others send a pull-request, some repository member must allow the action to run manually.
  • git-bob is not compatible with locally running open-source/weight LLMs. This might make sense when being executed locally only. In the Github-CI this might be impossible.

Similar projects

There are similar projects out there

Contributing

Feedback and contributions are welcome! Just open an issue and let's discuss before you send a pull-request. A human will respond and comment on your ideas!

Acknowledgements

We acknowledge the financial support by the Federal Ministry of Education and Research of Germany and by Sächsische Staatsministerium für Wissenschaft, Kultur und Tourismus in the programme Center of Excellence for AI-research „Center for Scalable Data Analytics and Artificial Intelligence Dresden/Leipzig“, project identification number: ScaDS.AI

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

git_bob-0.1.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

git_bob-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file git_bob-0.1.0.tar.gz.

File metadata

  • Download URL: git_bob-0.1.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for git_bob-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8496a8d5f2699c6207eb51b9460d12229cffd76aebed7cbc88c2b772d3cd6c18
MD5 720e3817cd176023e4d93cc50d51607c
BLAKE2b-256 d98f35e336f431efb33c422b3001b047033a5e4a4286c72fc1f0d93ce98e1091

See more details on using hashes here.

File details

Details for the file git_bob-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: git_bob-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for git_bob-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b6a61d376e3dc6e9afd6ffeec7bf9cbbfc9bf70fef85a99edce470b50558d07
MD5 3e13731ef372f5ccccb5cf36e9b52672
BLAKE2b-256 5602d8d65e5709bb3a31d3f4df5e6e576b4effbffcfae44ec583f1f9cd155400

See more details on using hashes here.

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