vblagoje / pr-auto

Automatically generate comprehensive Pull Request descriptions
Apache License 2.0
18 stars 1 forks source link

PR Auto

License Docker Pulls

Description

PR Auto is a GitHub Action designed to automatically generate pull request descriptions using Large Language Models (LLMs). By default, it utilizes OpenAI's models, but it also supports integration with a variety of other LLM providers such as fireworks.ai, together.xyz, anyscale, octoai, etc., allowing users to select their preferred provider and LLMs to best suit their needs. This action can be customized with system and user-provided prompts to tailor the PR description generation.

Auto PR  Demo

Usage

The minimum requirements to use this action with its default settings are:

Minimal Example Workflow

Here's a minimal example of how to use the PR Auto in a pull request workflow:

name: Pull Request Text Generator Workflow

on:
  pull_request_target:
    types: [opened]

jobs:
  generate-pr-text:
    runs-on: ubuntu-latest
    steps:
      - name: Generate PR Description
        uses: vblagoje/pr-auto@v1
        id: pr_auto
        with:
          openai_api_key: ${{ secrets.OPENAI_API_KEY }}

      - name: Update PR description
        uses: vblagoje/update-pr@v1
        with:
          pr-body: ${{ steps.pr_auto.outputs.pr-text }}

Important Security Consideration

Using PR Auto with the pull_request_target event is secure and allows PRs from forks. This approach:

Needless to say, don't use pr-auto in conjunction with fetching code from untrusted PR forks (e.g. via actions/checkout), especially when triggered by the pull_request_target event. Instead, follow the example above to safely use pr-auto.

For more detailed information on these security considerations, refer to:

Inputs

Contributing

If you have ideas for enhancing PR Auto, or if you encounter a bug, we encourage you to contribute by opening an issue or a pull request. The core of this GitHub Action is built on top of Docker image of the vblagoje/openapi-rag-service project. Therefore, for contributions beyond minor edits to the action.yml or README.md, please direct your pull requests to the vblagoje/openapi-rag-service GitHub repository.

License

This project is licensed under Apache 2.0 License.