Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 2.65 KB

issue-to-pr.md

File metadata and controls

58 lines (40 loc) · 2.65 KB

Aider Issue to PR Workflow

Don't waste time writing code for simple features anymore! Just tag your issues and let AI Automatically generate a PR for you!

See a demo of how it works.

Usage

The recommended way to use this workflow is to call it when an issue is labeled.

  1. Set OPENAI_API_KEY secret in your repository settings. You can get your API key from OpenAI.
  2. Create file .github/workflows/aider-on-issue-labeled.yml in your project with the following contents:
name: Auto-generate PR using Aider
on:
  issues:
    types: [labeled]

jobs:
  generate:
    uses: mirrajabi/aider-github-action/.github/workflows/aider-issue-to-pr.yml@main
    # Check if the label is 'aider'
    if: github.event.label.name == 'aider'
    with:
      issue-number: ${{ github.event.issue.number }}
      base-branch: ${{ github.event.repository.default_branch }}
    secrets: 
      openai_api_key: ${{ secrets.OPENAI_API_KEY }}

Inputs

You can pass the following arguments to the workflow:

Field Name Description Required Type Default
base-branch Base branch to create PR against true string -
chat-timeout Timeout for chat in minutes to prevent burning your credits false number 10
issue-number Issue number true number -
model Model to use false string 'gpt-4-1106-preview'

Example

In aider-github-workflows-test project you can find the following which demonstrate the full flow from Issue to generated PR.

  1. An issue that triggers the workflow.
  2. The workflow run
  3. A Pull request that was created

Roadmap

  • Add support for in PR chat and revisions

Disclaimer

You are responsible for the AI credit that is spent. All contributors in a GitHub project will be able to label issues which will trigger the workflow. Non-contributors are not be able to tag issues which helps greatly in preventing abuse.