feat: zero-config github-token default and branded comments via the relay - #9
Conversation
…elay - close #8 - github-token defaults to the workflow runtime token, so the PR comment works with no setup; explicit '' still skips commenting - new branded input (default true): post the comment as the bench bot via the OIDC-verified relay at api.bench.soroush.tech (soroush-tech/core#308); any relay failure logs the reason and falls back to the direct comment, never affecting the gate verdict - covered relay client (src/relay.ts) with injected deps; version 1.1.0 with release notes
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe action adds OIDC-authenticated branded PR commenting through a hosted relay, with direct-comment fallback and new input defaults. CI and release workflows adjust dependency installation, vendoring validation, and release SHA propagation. Version 1.1.0 documentation and release notes describe the updated behavior. ChangesBranded PR commenting
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Action as bench-action
participant OIDC as GitHub OIDC
participant Relay as Hosted relay
participant GitHub as GitHub API
Action->>OIDC: Request token with relay audience
OIDC-->>Action: Return OIDC token
Action->>Relay: Post repository, PR number, and report
Relay-->>Action: Return success or failure
Action->>GitHub: Directly upsert comment when relay fails
Possibly related issues
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 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 |
…elease sha, no entrypoint promise chain
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
…xist in a CJS bundle
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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.
Inline comments:
In @.github/workflows/release.yml:
- Line 79: Quote the entire run command in the release-commit step so the colon
in `chore(release): v$VERSION` is parsed as part of the command rather than YAML
syntax. Preserve the existing `node scripts/release-commit.mjs` invocation and
version interpolation.
In `@README.md`:
- Around line 34-43: Update the default-branded relay logic and the
corresponding README instructions so passing github-token: '' always skips
commenting, including when the relay is otherwise available. Ensure the
short-circuit is applied before relay or fallback token handling, and keep the
documented behavior consistent in both referenced sections.
In `@release-notes/1.1.0.md`:
- Around line 16-24: Update the release notes’ “Changed defaults” guidance to
state that setting github-token: '' alone preserves the previous skip-comment
behavior. Remove the contradictory requirement to also set branded: 'false',
keeping the contract consistent with the README and PR objective.
In `@src/index.ts`:
- Around line 38-55: Enforce the empty github-token opt-out in src/index.ts at
the branded relay flow by skipping relay posting when github-token is empty,
then use the GitHub-token fallback behavior. In action.yml lines 41-44, retain
the empty-token description; update README.md lines 34-43 and 84-85 to document
tokenless usage and the single-input opt-out; remove the contradictory
requirement to also set branded: 'false' from release-notes/1.1.0.md lines
16-24.
In `@src/relay.ts`:
- Around line 23-28: Update postViaRelay’s relay fetch to include an
AbortSignal.timeout with the appropriate request deadline, allowing a stalled
request to reject and trigger the existing github-token fallback. Add or update
tests covering the timeout/abort path and verifying fallback behavior.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 73f03b0e-78bd-444c-aa74-0c7cd9d360c2
📒 Files selected for processing (10)
.github/workflows/ci.yml.github/workflows/release.ymlREADME.mdaction.ymlpackage.jsonrelease-notes/1.1.0.mdscripts/release-commit.mjssrc/index.tssrc/relay.test.tssrc/relay.ts
|



Closes #8.
The results comment now works with zero consumer configuration, and can carry the bench brand when the public bench GitHub App is installed.
Changes
github-tokendefaults to${{ github.token }}— a consumer's whole integration is theuses:block plus the gate inputs; the sticky comment posts with the workflow's automatic runtime token. Explicit''still opts out; passing an App token still overrides the author.brandedinput (default'true'): when the job grantsid-token: writeand the bench GitHub App is installed on the repo, the comment is posted as the bench bot through the OIDC-verified relay atapi.bench.soroush.tech(src/relay.ts; relay worker lives in [RFC] Branded benchmark PR comments via a GitHub App and a hosted comment relay core#308). Any relay failure — app not installed, no OIDC permission, relay down — logs the reason and falls back to the directgithub-tokencomment. The gate verdict is never affected by comment delivery.release-notes/1.1.0.md(default flip = contract change, minor bump).Verification
brandednot'false'; every failure path degrades to the existing direct-comment code, which is unchanged and already tested.Summary by CodeRabbit
New Features
brandedoption to control branded commenting.Changed Defaults
github-token.Documentation