Repository navigation
fix: Resolve TypeScript compilation errors in GitHub integration - #96
Merged
Merged
Conversation
This commit fixes the TypeScript errors that were causing the release build to fail after merging PR #95 (GitHub GPG key integration). Changes: - Add missing 'github' and 'githubName' properties to KeysOptions interface - Fix type mismatch in githubUtils.ts by mapping PgpKeyInfo to GitHubKeyAddInfo - Map keyId to fingerprint (importPgpKey returns keyId, not fingerprint) - Convert email from 'string | null' to 'string | undefined' using nullish coalescing - Add 'github' to ImportOptions source type in unifiedKeyManager.ts Fixes build errors: - Property 'github' does not exist on type 'KeysOptions' (cli/index.ts:885-903) - Property 'githubName' does not exist on type 'KeysOptions' (cli/index.ts:897) - Property 'fingerprint' does not exist on type 'PgpKeyInfo' (cli/githubUtils.ts:177, 185) - Type 'string | null' is not assignable to type 'string | undefined' (cli/githubUtils.ts:186) - Argument of type 'PgpKeyInfo' is not assignable to parameter of type 'GitHubKeyAddInfo' (cli/githubUtils.ts:173) - Type '"github"' is not comparable to ImportOptions source types (cli/unifiedKeyManager.ts:664) Related to: #94 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Owner
Author
|
#94 fixes |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes TypeScript compilation errors introduced in PR #95 that were preventing the release build from completing. The changes add missing type definitions and resolve type mismatches in the GitHub GPG key integration feature.
Key Changes:
- Extended type definitions to include GitHub-specific options
- Fixed type mismatches in the GitHub key import flow
- Corrected property mappings between PGP and GitHub key formats
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cli/index.ts | Added github and githubName properties to KeysOptions interface |
| cli/githubUtils.ts | Fixed type mismatch by mapping PgpKeyInfo to GitHubKeyAddInfo format |
| cli/unifiedKeyManager.ts | Added 'github' as valid source type in ImportOptions |
Comment on lines
+174
to
+177
| const githubKeyInfo = { | ||
| fingerprint: keyInfo.keyId, | ||
| email: keyInfo.email ?? undefined | ||
| }; |
There was a problem hiding this comment.
The comment states 'importPgpKey returns keyId, not fingerprint' but the mapping uses keyId as fingerprint for GitHub keys. This needs clarification—either the comment should explain why keyId is semantically equivalent to fingerprint for GitHub keys, or document if this is a workaround for a limitation in the PGP import.
github-actions Bot
added a commit
that referenced
this pull request
Oct 22, 2025
Version bump type: patch PR: #96 Title: fix: Resolve TypeScript compilation errors in GitHub integration
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.
Summary
Fixes the TypeScript compilation errors that were causing the release build to fail after merging PR #95 (GitHub GPG key integration). This enables the release workflow to complete successfully.
Issues Fixed
This PR resolves all TypeScript errors from the failed release build:
Property 'github' does not exist on type 'KeysOptions'(cli/index.ts:885-903)Property 'githubName' does not exist on type 'KeysOptions'(cli/index.ts:897)Property 'fingerprint' does not exist on type 'PgpKeyInfo'(cli/githubUtils.ts:177, 185)Type 'string | null' is not assignable to type 'string | undefined'(cli/githubUtils.ts:186)Argument of type 'PgpKeyInfo' is not assignable to parameter of type 'GitHubKeyAddInfo'(cli/githubUtils.ts:173)Type '"github"' is not comparable to ImportOptions source types(cli/unifiedKeyManager.ts:664)Changes Made
1. cli/index.ts
github?: stringandgithubName?: stringproperties toKeysOptionsinterface2. cli/githubUtils.ts
PgpKeyInfotoGitHubKeyAddInfokeyId→fingerprint(importPgpKey returns keyId, not fingerprint)email: string | null→email?: stringusing nullish coalescing operator3. cli/unifiedKeyManager.ts
'github'to theImportOptions.sourceunion type4. package-lock.json
npm installduring verificationTest Plan
npm installto ensure dependencies are installednpm run buildto verify TypeScript compilation succeedsRelated
🤖 Generated with Claude Code