Review code with Gemini, commit, and create a Pull Request
Reviews code with AI, commits changes, and creates a GitHub Pull Request.
/plugin marketplace add bokuhe/claude-duet/plugin install duet@duet-marketplaceReview pending git changes with Gemini AI, apply selected feedback, commit, and create a GitHub Pull Request.
Follow the same steps as /duet:review:
git branch --show-current
git log origin/main..HEAD --oneline
Ensure we're not on main/master branch. If we are:
You're on the main branch. Would you like me to:
1. Create a new branch for this PR
2. Cancel the PR creation
Enter your choice:
If user chooses option 1:
git checkout -b feature/code-review-improvements
git push -u origin $(git branch --show-current)
If push fails due to no upstream:
git push --set-upstream origin $(git branch --show-current)
Use GitHub CLI to create the PR:
gh pr create --title "refactor: apply code review feedback" --body "$(cat <<'EOF'
## Summary
This PR includes code improvements identified through AI-assisted code review.
## Changes
- Add null check to process function
- Use const for immutable variables
- [other changes...]
## Review Process
- Reviewed by: Gemini AI
- Feedback applied: 3/5 suggestions
- Review cycles: 2
## Checklist
- [x] Code reviewed by AI
- [x] Changes tested locally
- [ ] Documentation updated (if needed)
---
Generated with [Duet](https://github.com/bokuhe/claude-duet) - AI Code Review
EOF
)"
## Pull Request Created
**PR:** #123
**URL:** https://github.com/owner/repo/pull/123
**Title:** refactor: apply code review feedback
**Branch:** feature/code-review-improvements -> main
### Summary
- Files changed: 3
- Additions: +25
- Deletions: -10
The PR is ready for human review!
GitHub CLI (`gh`) is not installed.
Please install it first:
\`\`\`bash
# macOS
brew install gh
# Windows
winget install GitHub.cli
# Linux
sudo apt install gh
\`\`\`
Then authenticate:
\`\`\`bash
gh auth login
\`\`\`
Alternatively, create the PR manually:
1. Go to: https://github.com/owner/repo/compare/branch-name
2. Click "Create Pull Request"
GitHub CLI is not authenticated.
Please run:
\`\`\`bash
gh auth login
\`\`\`
And follow the prompts to authenticate.
Push was rejected. Possible reasons:
1. **Branch exists on remote**
\`\`\`bash
git pull --rebase origin branch-name
git push
\`\`\`
2. **No permission**
Check your repository access permissions.
3. **Protected branch**
You may need to push to a different branch.
A PR already exists for this branch.
**Existing PR:** #120
**URL:** https://github.com/owner/repo/pull/120
Would you like to:
1. Update the existing PR (push new commits)
2. View the existing PR
3. Cancel
Enter your choice: