Skip to content

feat(ci): request charlie review only after CI passes - #68

Closed
faultless-casey wants to merge 2 commits into
mainfrom
casey/charlie-reviewer-on-ci-pass
Closed

faultless-casey wants to merge 2 commits into
mainfrom
casey/charlie-reviewer-on-ci-pass

Conversation

@faultless-casey

@faultless-casey faultless-casey commented May 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • On any pull_request event (open, reopen, sync, ready for review), removes CharlieHelps as a reviewer so stale review requests are cleared on each push
  • Adds a check_suite: completed trigger that re-adds Charlie via the review pipeline only when a GitHub Actions suite passes
  • Excludes check suites from third-party apps (coderabbitai, vercel, cloudflare-workers-and-pages, sentry, render, charliecreates) to avoid duplicate triggers
  • Guards the version job to only run on pull_request and workflow_call events, not on every check suite completion

Test plan

  • Open a PR and confirm CharlieHelps is not immediately added as reviewer
  • Push a new commit and confirm CharlieHelps is removed if previously assigned
  • Let CI pass and confirm CharlieHelps is added as reviewer
  • Confirm third-party check suite completions (CodeRabbit, Vercel, etc.) do not trigger the pipeline

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved CI workflow triggers to respond to additional completion events.
    • Added automation to remove an automated reviewer request on PRs.
    • Broadened pipeline execution conditions and concurrency handling for more scenarios.
    • Restricted versioning job to only run for PR and workflow-call contexts.

Note: No user-visible changes; updates affect internal CI/CD processes.

Remove CharlieHelps as reviewer on every push, then re-add via the
review pipeline only once the GitHub Actions check suite completes
successfully. Excludes check suites from third-party apps (coderabbit,
vercel, cloudflare, sentry, render, charliecreates) to avoid
redundant triggers.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@coderabbitai

coderabbitai Bot commented May 8, 2026 •

Copy link
Copy Markdown

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a94d0498-a184-4e1b-8e9e-b49ff4cd890f

📥 Commits

Reviewing files that changed from the base of the PR and between 26d447c and 0cc773d.

📒 Files selected for processing (1)
  • .github/workflows/charlie-review.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/charlie-review.yml

📝 Walkthrough

Walkthrough

The workflow file is updated to integrate check_suite completion events as an additional trigger alongside pull_request and workflow_call events. The pipeline job's execution conditions and concurrency group logic are expanded to recognize successful check_suite runs with associated pull requests. The version job is restricted to run only on pull_request and workflow_call events via a new conditional guard. A new remove-reviewer job is introduced to remove CharlieHelps from requested reviewers for pull_request events.

Suggested reviewers

  • CharlieHelps
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: requesting Charlie review only after CI passes, which aligns with the primary objective of the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch casey/charlie-reviewer-on-ci-pass

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/charlie-review.yml (1)

24-31: 💤 Low value

Consider logging unexpected errors.

The empty catch {} silently swallows all errors, including legitimate failures (auth issues, rate limits, network errors). A 404 when the reviewer isn't assigned is expected, but other errors may warrant logging.

🔧 Optional: Log unexpected errors
             try {
               await github.rest.pulls.removeRequestedReviewers({
                 owner: context.repo.owner,
                 repo: context.repo.repo,
                 pull_number: context.payload.pull_request.number,
                 reviewers: ['CharlieHelps'],
               });
-            } catch {}
+            } catch (error) {
+              // 404 is expected if reviewer wasn't assigned
+              if (error.status !== 404) {
+                core.warning(`Failed to remove reviewer: ${error.message}`);
+              }
+            }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 957072c6-7206-46d3-a0ee-da9f9b807062

📥 Commits

Reviewing files that changed from the base of the PR and between 83b81ba and 26d447c.

📒 Files selected for processing (1)
  • .github/workflows/charlie-review.yml

Comment thread .github/workflows/charlie-review.yml Outdated
null != '' evaluates to true in GitHub Actions expressions, so the
previous guard did not prevent the pipeline from running when no PR
was associated with the check suite.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@faultless-casey

Copy link
Copy Markdown
Collaborator Author

Closing this in favour of a new implementation using workflow_run instead of check_suite — check_suite doesn't fire for GitHub Actions check suites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant