The automated PR workflow
1. PR Creation
When DevBird 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, DevBird:- 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
DevBird 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 DevBird PR:- Link to the DevBird 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
- DevBird 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
- DevBird 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.Reviewer permissions
For security, DevBird verifies that reviewers have appropriate permissions before triggering workflows:Write Access Requirement
For human reviewers:- Must have Write (Push) or Admin access to the repository
- Verified via GitHub API permission check
- Reviews from users without write access are silently ignored
- All permission checks are logged for security auditing
- Exempt from permission checks when “Auto-apply Bot Reviews” is enabled
- Use GitHub App installation token for authentication
- Bypasses individual permission requirements
Why write access is required
This security measure prevents:- Unauthorized users from triggering workflows via PR reviews
- Potential abuse of compute resources
- Unauthorized code execution in your workflows
Troubleshooting permission issues
If your reviews aren’t triggering workflows:- Verify you have Write or Admin access to the repository
- Check that you’ve connected the repository in DevBird
- Ensure the repository has DevBird webhook configured
- Review webhook delivery logs for permission errors
Draft status during updates
DevBird 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
DevBird monitors:check_runwebhookscheck_suitewebhooks- 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), DevBird 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 DevBird’s automated workflow, we recommend configuring GitHub Rulesets to protect your repository while allowing DevBird 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 DevBird bot - Let DevBird clean up commit history after addressing reviews
- Allow deletions: Disable - Protect branches from accidental deletion
- Only the DevBird 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 DevBird bot account for force push permissions
Best practices
For Reviewers
Be specific in feedback:For PR Authors
Monitor automated updates:- Check that DevBird addressed your feedback
- Review changes made by AI
- Add manual updates if needed
- Request updates through DevBird
- 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 DevBird task details
- Find the PR you want to update
- Click Update PR
- Enter update instructions
- DevBird 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/devbird-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/devbird-example/pull/123#issuecomment-337041341 - DevBird 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 DevBird Settings
- Learn about AI Reviewers
- Troubleshoot Unit Tasks
