Skip to content

sync: type CodeRabbit auto-approve author set - #500

Merged
p-linnane merged 1 commit into
shared-config-rspecfrom
coderabbit-set-type
Oct 16, 2026
Merged

p-linnane merged 1 commit into
shared-config-rspecfrom
coderabbit-set-type

Conversation

@p-linnane

@p-linnane p-linnane commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

With no approved authors, the synced .coderabbit.config.ts builds new Set([]), which TypeScript infers as Set<never>, so CodeRabbit flagged its has lookup in Homebrew/brew.sh#1385. Declaring it as Set<string> fixes strict type-checking. The next sync updates .coderabbit.config.ts in every repository that receives it. The spec now strips TypeScript types before evaluating the configuration and checks that the annotation stays.

GPT-6 Astra wrote the fix and reproduced the error with tsc --strict and @coderabbitai/config. Claude Opus 5.5 reviewed it, re-ran that check on the old and new templates with empty and populated author lists and ran the spec with the GitHub Actions environment.

Summary by CodeRabbit

  • Chores
    • Improved validation of automated review settings, including checks for how empty author lists are handled.
    • No user-facing changes.

@p-linnane
p-linnane requested a review from a team as a code owner October 16, 2026 04:35
Signed-off-by: Patrick Linnane <patrick@linnane.io>
@p-linnane
p-linnane force-pushed the coderabbit-set-type branch from f3ef6b9 to b9b5cae Compare October 16, 2026 04:40
@p-linnane
p-linnane added this pull request to stack #501 October 16, 2026 04:48
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aeec9549-59f5-47a8-adef-dd85a83811c2
📥 Commits

Reviewing files that changed from the base of the PR and between 0bc3489 and b9b5cae.

📒 Files selected for processing: 2
  • .github/actions/sync/coderabbit.template.ts
  • .github/actions/sync/shared-config_spec.rb

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📝 Walkthrough

The template now explicitly types autoApproveAuthors as Set<string>. The test checks for this type and strips TypeScript types before evaluating the configuration.

Changes: Author set typing

Layer / File(s) Summary
Type the author set and update its test
.github/actions/sync/coderabbit.template.ts, .github/actions/sync/shared-config_spec.rb
The template declares autoApproveAuthors as Set<string>. The test checks for this annotation and strips TypeScript types before evaluating the configuration.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to b9b5c

The type annotation and updated test appear ready to merge after normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding an explicit type to the CodeRabbit auto-approve author set.
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.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Biome (2.5.14)
.github/actions/sync/coderabbit.template.ts

File contains syntax errors that prevent linting: Line 4: Expected an expression for the left hand side of the % operator.

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

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@p-linnane
p-linnane merged commit 9a73632 into main Oct 16, 2026
27 of 34 checks passed
@p-linnane
p-linnane deleted the coderabbit-set-type branch October 16, 2026 15:41
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.

2 participants