An AI-powered GitHub Action that automatically analyzes issues and suggests solutions using Google's Gemini Flash AI model.
name: Issue Resolution
on:
issues:
types: [opened]
issue_comment:
types: [created]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
resolve:
runs-on: ubuntu-latest
steps:
- name: Run Issue Resolution
uses: laurigates/gha-issue-resolution@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
gemini-api-key: ${{ secrets.GEMINI_API_KEY }}
max-tokens: '8192'
GEMINI_API_KEY
The action automatically responds to:
New Issues:
Comments with commands:
/update
- Get an updated analysis/create-pr
- Create a pull request with suggested changesInput | Description | Required | Default |
---|---|---|---|
github-token |
GitHub token for API access | Yes | N/A |
gemini-api-key |
Google Gemini API key | Yes | N/A |
max-tokens |
Maximum tokens for response | No | 8192 |
When a new issue is opened:
Issue: "Button component not properly handling click events"
β
AI Response:
- Analyzes the code
- Suggests fixes
- Provides implementation examples
Using commands in comments:
Comment: "/update"
β
AI Response:
- Fresh analysis of the issue
- Updated solution suggestions
Comment: "/create-pr"
β
Result:
- Creates a new branch
- Implements suggested changes
- Opens a pull request
Contributions are welcome! Please check out our Contributing Guidelines.
MIT License - see LICENSE file for details.