feat: auto-reply Add GitHub Actions workflow for CodeRabbit suggestion replies apply on CodeRabbit suggestion comments#105
Conversation
Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/d9f31daf-c3ae-45df-9390-c25d17629931 Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughListen up. Adds a GitHub Actions workflow that replies Changes
Sequence Diagram(s)sequenceDiagram
participant Bot as "CodeRabbit Bot"
participant GitHub as "GitHub (Event)"
participant Actions as "GitHub Actions Runner"
participant Script as "actions/github-script API"
Bot->>GitHub: Post review comment with fenced ```suggestion``` block
GitHub->>Actions: Trigger workflow on pull_request_review_comment
Actions->>Script: Execute script -> calls pulls.createReplyForReviewComment(pr, comment_id, body)
Script->>GitHub: Request to create reply comment
GitHub->>Actions: Acknowledge reply created
Actions->>GitHub: Workflow completes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/coderabbit-auto-apply.yml:
- Around line 14-15: The condition checking the comment author uses the wrong
bot login string; update the workflow condition that compares
github.event.comment.user.login (and the contains check) to use
'coderabbitai[bot]' instead of 'coderabbit-ai[bot]' so the branch with
contains(github.event.comment.body, '```suggestion') can match and the job will
run.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a49ecfae-c34b-4b4b-bc3a-57f72b52e80c
📒 Files selected for processing (1)
.github/workflows/coderabbit-auto-apply.yml
Signed-off-by: RB <7775707+nitrocode@users.noreply.github.com>


Summary
Automates applying CodeRabbit inline suggestions on PRs. When CodeRabbit posts a review comment containing a suggestion block, the workflow immediately replies
@coderabbit apply, triggering CodeRabbit's own apply mechanism — no diff parsing, no file manipulation, no fragility.Changes
.github/workflows/coderabbit-auto-apply.yml— triggers onpull_request_review_comment: created; guards onuser.login == 'coderabbit-ai[bot]'AND body contains```suggestion; posts reply viapulls.createReplyForReviewCommentAgent Checklist
npm run test:cipasses (all unit tests green, coverage not decreased)npm run build && npm run test:e2epasses (all E2E tests green)script.js,styles.css,*-data.js)innerHTMLvalues pass throughescHtml()death-clock-core.jsuses:pins use a full commit SHA + inline semver commentfeat:,fix:,docs:,chore:, etc.)project-stats.yamlupdated if this session merges one or more PRsdocs/LEARNINGS.md(new pattern or lesson learned)Summary by CodeRabbit