An AI-powered GitHub Action that implements code changes based on PR comments using the Auggie SDK.
- 🤖 AI-Powered Implementation: Uses Auggie SDK to understand and implement requested changes
- 📋 Context-Aware: Gathers full PR context including diff, files, and comment threads
- 🔄 Automatic Commits: Commits and pushes changes directly to the PR branch
- 💬 Status Updates: Posts success/failure comments to the PR
- 👀 Visual Feedback: Adds emoji reactions to show processing status
- ✅ Full TypeScript: Type-safe implementation with comprehensive error handling
- name: PR Assistant
uses: augmentcode/augment-agent/assistant@feature/comment-reaction-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
comment_id: ${{ github.event.comment.id }}
event_name: ${{ github.event_name }}
augment_api_token: ${{ secrets.AUGMENT_API_KEY }}
augment_api_url: ${{ secrets.AUGMENT_API_URL }}- name: PR Assistant
uses: augmentcode/augment-agent/assistant@feature/comment-reaction-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
comment_id: ${{ github.event.comment.id }}
event_name: ${{ github.event_name }}
reaction: rocket
augment_api_token: ${{ secrets.AUGMENT_API_KEY }}
augment_api_url: ${{ secrets.AUGMENT_API_URL }}name: PR Assistant
on:
pull_request_review_comment:
types: [created]
issue_comment:
types: [created]
permissions:
contents: read
pull-requests: write
issues: write
jobs:
assistant:
if: |
contains(github.event.comment.body, '@augment') ||
contains(github.event.comment.body, '@Augment')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Run PR Assistant
uses: augmentcode/augment-agent/assistant@feature/comment-reaction-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
comment_id: ${{ github.event.comment.id }}
event_name: ${{ github.event_name }}
reaction: eyes
augment_api_token: ${{ secrets.AUGMENT_API_KEY }}
augment_api_url: ${{ secrets.AUGMENT_API_URL }}- Trigger: Workflow is triggered by a comment containing
@augmentor@Augment - React: Adds an emoji reaction (default: 👀) to show processing has started
- Gather Context: Collects PR metadata, diff, files changed, and comment thread
- Invoke Auggie: Sends the context and instruction to Auggie SDK
- Implement: Auggie analyzes the request and implements the changes
- Commit: Automatically commits changes with a descriptive message
- Push: Pushes the commit to the PR's head branch
- Notify: Posts a success or failure comment to the PR
| Input | Description | Required | Default |
|---|---|---|---|
github_token |
GitHub token for API access and git operations | Yes | - |
comment_id |
The ID of the comment that triggered the workflow | Yes | - |
event_name |
The GitHub event name (pull_request_review_comment or issue_comment) |
Yes | - |
augment_api_token |
Augment API token for authentication | Yes | - |
augment_api_url |
Augment API URL endpoint | Yes | - |
reaction |
The reaction type to add (optional) | No | eyes |
+1- 👍-1- 👎laugh- 😄confused- 😕heart- ❤️hooray- 🎉rocket- 🚀eyes- 👀
| Output | Description |
|---|---|
success |
Whether the reaction was successfully added (true or false) |
The action requires the following permissions:
permissions:
contents: read # To read repository content
pull-requests: write # To add reactions and comments to PRs
issues: write # To add reactions and comments to issuesAdd the following secrets to your repository:
AUGMENT_API_KEY: Your Augment API tokenAUGMENT_API_URL: Your Augment API URL endpoint
Create .github/workflows/assistant.yml with the example workflow above.
Create a test PR and comment with @augment <your instruction>. For example:
@augment Add error handling to the login function
The assistant will:
- React with 👀 to acknowledge
- Gather PR context
- Implement the requested changes
- Commit and push to the PR branch
- Comment with the result
@augment Add unit tests for the UserService class@augment Refactor this function to use async/await@augment Fix the TypeScript errors in this file@augment Add JSDoc comments to all exported functions@augment Implement the TODO comments in this PR
- Check that Auggie has write access to the repository
- Verify that the PR branch is not protected
- Check the workflow logs for errors
- Verify
AUGMENT_API_KEYandAUGMENT_API_URLare set correctly - Check that the API endpoint is accessible from GitHub Actions
- Ensure the workflow has
contents: writepermission - Check that the checkout step uses the correct branch reference
MIT