ci: add Codex review workflow#97
Conversation
📝 WalkthroughWalkthroughAdds a new GitHub Actions workflow file that triggers Codex-based automated review on pull requests, runs the review via openai/codex-action, and posts the resulting feedback as a PR comment through a separate follow-up job. ChangesCodex Review Automation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant GitHub as GitHub PR Event
participant CodexJob as codex job
participant CodexAction as openai/codex-action
participant PostFeedback as post_feedback job
participant PRComment as PR Comment
GitHub->>CodexJob: pull_request event (not draft)
CodexJob->>CodexAction: run with OPENAI_API_KEY and prompt
CodexAction-->>CodexJob: final_message output
CodexJob->>PostFeedback: job completes with final_message
PostFeedback->>PRComment: create issue comment if final_message non-empty
Related Issues: None found Poem: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Findings
No other actionable issues found in the introduced workflow. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/codex.yml (1)
56-77: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAvoid creating a new Codex comment on every PR update.
Every
synchronizeevent posts another standalone comment. Consider adding a hidden marker and updating the existing Codex comment instead to keep PR discussions readable.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/codex.yml around lines 56 - 77, The PR feedback step in the codex workflow always creates a new comment, which causes duplicate Codex comments on each update. Update the post_feedback logic in the github-script step to look for an existing Codex comment using a hidden marker in the comment body, then edit that comment instead of always calling createComment; keep the marker in the message built from CODEX_FINAL_MESSAGE so the script can reliably find and update the same comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/codex.yml:
- Around line 56-77: The PR feedback step in the codex workflow always creates a
new comment, which causes duplicate Codex comments on each update. Update the
post_feedback logic in the github-script step to look for an existing Codex
comment using a hidden marker in the comment body, then edit that comment
instead of always calling createComment; keep the marker in the message built
from CODEX_FINAL_MESSAGE so the script can reliably find and update the same
comment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7e2d2f26-ce40-4d57-8e11-ce330e935c37
📒 Files selected for processing (1)
.github/workflows/codex.yml
|
Updated in be29af6:
Local validation passed: |
|
Findings
I did not run tests; this was a workflow-only review. |
Description
Adds a GitHub Actions workflow that runs openai/codex-action on pull requests and posts Codex review feedback as a PR comment.
Type of change
Checklist
bun run lintpasses with no errorsbun run check:jsdoc-coveragepasses with no errorsbun run typecheckpasses with no errorsbun testpasses with no errorsRelated issues
None.
Additional context
Uses
OPENAI_API_KEYfrom repository secrets andpermission-profile: ":workspace"per the Codex Action recommendations.Summary by CodeRabbit