Skip to content

Commit d5d4ac9

Browse files
committed
fix(socket-fix): add missing import and fix optional prNumber type
- Add gitDeleteRemoteBranch import to coana-fix.mts - Fix optional prNumber type handling in ghsa-tracker.mts for exactOptionalPropertyTypes
1 parent 45e4822 commit d5d4ac9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/cli/src/commands/fix/coana-fix.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
gitCommit,
3232
gitCreateBranch,
3333
gitDeleteBranch,
34+
gitDeleteRemoteBranch,
3435
gitPushBranch,
3536
gitRemoteBranchExists,
3637
gitResetAndClean,

packages/cli/src/commands/fix/ghsa-tracker.mts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,15 @@ export async function markGhsaFixed(
7070
tracker.fixed = tracker.fixed.filter(r => r.ghsaId !== ghsaId)
7171

7272
// Add new record.
73-
tracker.fixed.push({
73+
const record: GhsaFixRecord = {
7474
branch: branch ?? getSocketFixBranchName(ghsaId),
7575
fixedAt: new Date().toISOString(),
7676
ghsaId,
77-
prNumber,
78-
})
77+
}
78+
if (prNumber !== undefined) {
79+
record.prNumber = prNumber
80+
}
81+
tracker.fixed.push(record)
7982

8083
// Sort by fixedAt descending (most recent first).
8184
tracker.fixed.sort((a, b) => b.fixedAt.localeCompare(a.fixedAt))

0 commit comments

Comments
 (0)