The automated PR workflow
1. PR Creation
When AutoDev creates a pull request:- PR is opened for review
- Task link comment is added
- Task prompt comment is added (if enabled)
- CI checks begin running
2. Code Review
Team members review the PR normally:- Leave review comments
- Request changes
- Approve changes
3. Automatic Response
When a review is submitted, AutoDev:- Detects the review via GitHub webhook
- Converts PR to draft status (except for simple approvals)
- Triggers a workflow to address the feedback
- AI agent analyzes the review and makes changes
- Pushes updates to the PR branch
- CI checks run again
4. CI Monitoring
AutoDev watches CI check status:- When all checks complete
- If any checks fail
- Automatically triggers fix workflow
- AI agent investigates and fixes failures
- Updates are pushed to the PR
5. Ready for Merge
When everything passes:- All CI checks pass
- All review feedback addressed
- PR is automatically undrafted (if enabled)
- Ready for final approval and merge
PR comments
Task Link Comment
Always added to every AutoDev PR:- Link to the AutoDev task
- Task ID reference
- Context for reviewers
Task Prompt Comment
Optional, enabled by default. Shows the original task prompt in PR comments to provide context for reviewers. For details about this feature including benefits and how to configure it, see Enable Prompt Comments in the settings documentation.Review types and behavior
Changes Requested
When reviewer requests changes:- PR converts to draft
- AutoDev workflow triggered
- AI analyzes review comments
- Changes are made and pushed
- PR remains draft until CI passes
Comments Only
When reviewer adds comments (not requesting changes):- PR converts to draft
- AutoDev workflow triggered
- AI addresses comments
- Updates pushed to PR
- PR remains draft until CI passes
Approvals
When reviewer approves without comments:- PR stays as-is (not converted to draft)
- No workflow triggered
- PR ready for merge (if CI passes)
Bot Reviews
When a bot account submits a review, behavior depends on the “Auto-apply Bot Reviews” setting. See Settings for details.Draft status during updates
AutoDev converts PRs to draft during automated updates to:- Signal work is in progress
- Prevent accidental merges during changes
- Avoid confusing reviewers
- Indicate AI is actively working
Automatic CI fixes
When CI checks fail:Detection
AutoDev monitors:check_run
webhookscheck_suite
webhooks- Waits for all checks to complete
- Identifies failing checks
Fix Workflow
If failures detected:- Creates fix workflow execution
- Converts PR to draft
- Generates detailed fix prompt with:
- Original task prompt
- List of failing checks
- Links to check details
- AI investigates failures using GitHub CLI
- Fixes are made and pushed
- CI runs again
Rate Limiting
To prevent excessive fix attempts:- Maximum 1 fix attempt per commit
- Tracked by commit SHA
- New commits allow new fix attempts
Auto-undraft feature
When enabled (default), AutoDev automatically converts draft PRs to ready-for-review when all CI checks pass. For details about this feature including when to enable/disable it and configuration options, see Auto-undraft PR in the settings documentation.GitHub Ruleset recommendations
To optimize AutoDev’s automated workflow, we recommend configuring GitHub Rulesets to protect your repository while allowing AutoDev to work efficiently.Recommended ruleset configuration
Branch protection rules:- Require pull request reviews - Ensure human oversight of AI-generated code
- Require status checks to pass - Enforce CI validation before merging
- Allow force pushes: Enable for AutoDev bot - Let AutoDev clean up commit history after addressing reviews
- Allow deletions: Disable - Protect branches from accidental deletion
- Only the AutoDev bot account has this permission
- Changes still go through PR review
- CI checks must still pass
- Human approval required for merge
- Go to your repository settings
- Navigate to Rules → Rulesets
- Create a new ruleset for your target branches (e.g.,
main
,develop
) - Configure branch protections as above
- Under “Bypass list,” add the AutoDev bot account for force push permissions
Best practices
For Reviewers
Be specific in feedback:For PR Authors
Monitor automated updates:- Check that AutoDev addressed your feedback
- Review changes made by AI
- Add manual updates if needed
- Request updates through AutoDev
- Let AI handle repetitive fixes
- Make final manual adjustments
- Single responsibility per PR
- Easier for AI to maintain
- Faster review cycles
Manual PR updates
You can also manually request PR updates:- Go to AutoDev task details
- Find the PR you want to update
- Click Update PR
- Enter update instructions
- AutoDev converts PR to draft and makes changes
- Review feedback is complex
- Need additional features
- Want to refine the implementation
Applying reviews from other reviewers
You can apply review feedback from other pull requests using the Reflect command:- Find the review comment you want to apply.
- Copy the comment’s direct link (e.g.,
https://github.com/delinoio/autodev-example/pull/123#issuecomment-337041341
) - On the current PR, submit a review with “Request changes”
- In the review message, use:
Reflect https://github.com/delinoio/autodev-example/pull/123#issuecomment-337041341
- AutoDev will analyze the linked review comment and apply those changes to the current PR
- Applying reviews from other people
Troubleshooting
For common PR review issues and solutions, see the PR Review Troubleshooting guide.Next steps
- PR Review Troubleshooting
- Configure AutoDev Settings
- Learn about AI Reviewers
- Troubleshoot Unit Tasks