Closed
Conversation
Fixed TypeScript error: - src/actions/users.ts: Removed incompatible index signature from UserCreateAuditSnapshot type The [key: string]: unknown index signature required the User type to also have an index signature, which it doesn't. Removing it is safe because TypeScript's structural typing allows passing objects with more properties than the type requires. CI Run: https://github.com/ding113/claude-code-hub/actions/runs/24651486330
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI Auto-Fix
Original PR: #1039
Failed CI Run: Non-Main Branch CI/CD
Fix Applied
Error Details
The type had an index signature that required any object passed to it (like the type) to also have an index signature. Since the repository's type doesn't have this index signature, TypeScript reported:
Why This Fix Is Safe
Verification
Auto-generated by Claude AI
Greptile Summary
This auto-generated PR fixes a TypeScript CI failure from PR #1039 by removing an incompatible index signature from the
UserCreateAuditSnapshothelper type insrc/actions/users.ts. Without the index signature, TypeScript's structural typing correctly allows the repository'sUsertype to be passed toemitUserCreateAudit— no logic changes are involved.Confidence Score: 5/5
Safe to merge — single-type narrowing change with no logic impact.
The only change is removing an overly-broad index signature from a local helper type. The runtime behaviour is identical; the only finding is a stale biome-ignore comment (P2).
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["addUser() / createUserOnly()"] -->|"calls createUser()"| B["newUser: User (repository type)"] B -->|"passed to"| C["emitUserCreateAudit(user: UserCreateAuditSnapshot)"] C -->|"reads user.id, user.name"| D["emitActionAudit with after: user"] D -->|"redactSensitive()"| E["createAuditLogAsync()"] subgraph Fix["TypeScript Fix"] F["Before: index signature required matching type on User - not assignable"] G["After: type only requires id and name - User is assignable via structural typing"] endComments Outside Diff (1)
src/actions/users.ts, line 1119-1121 (link)The
biome-ignore lint/suspicious/noExplicitAnycomment no longer targets anyanytype — after the index signature was removed, theUserCreateAuditSnapshottype only usesstring | numberandstring | null. Biome'snoExplicitAnyrule has nothing to suppress here, so this comment is dead noise and could mislead future readers into thinking ananyis lurking.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix: auto-fix CI failures for PR #1039" | Re-trigger Greptile