Skip to content

Commit edcda2e

Browse files
committed
fix: update CI to fix ts issues
1 parent c67a8ad commit edcda2e

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

bin/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { stageAllAndCommit } from '../src/utils/git.js';
1010
import { generateAISummary } from '../src/utils/ai.js';
1111
import { ConfigSchema, type Config } from '../src/types/config.js';
1212
import { defaultConfig } from '../src/config/defaultConfig.js';
13-
import { printBanner, showLoadingAnimation, printWelcome, printFeatureHighlight, BRAND_COLORS } from '../src/ui/banner.js';
13+
import { printBanner, showLoadingAnimation, printFeatureHighlight, BRAND_COLORS } from '../src/ui/banner.js';
1414

1515
async function loadConfig(): Promise<Config> {
1616
try {

scripts/check-commit.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ interface ValidationResult {
1212
}
1313

1414
interface ParsedCommit {
15-
type?: string;
16-
scope?: string;
17-
breaking?: boolean;
18-
subject?: string;
19-
body?: string;
20-
footer?: string;
15+
type?: string | undefined;
16+
scope?: string | undefined;
17+
breaking?: boolean | undefined;
18+
subject?: string | undefined;
19+
body?: string | undefined;
20+
footer?: string | undefined;
2121
}
2222

2323
/**
@@ -91,21 +91,23 @@ function parseCommitMessage(message: string): ParsedCommit {
9191
if (match) {
9292
const [, type, scopeWithParens, breaking, subject] = match;
9393
const scope = scopeWithParens ? scopeWithParens.slice(1, -1) : undefined;
94+
const bodyText = lines.slice(2).join('\n').trim();
9495

9596
return {
9697
type,
9798
scope,
9899
breaking: !!breaking,
99100
subject: subject?.trim(),
100-
body: lines.slice(2).join('\n').trim() || undefined,
101+
body: bodyText || undefined,
101102
footer: undefined // Could be parsed more thoroughly if needed
102103
};
103104
}
104105

105106
// If not conventional format, treat entire header as subject
107+
const bodyText = lines.slice(2).join('\n').trim();
106108
return {
107109
subject: header.trim(),
108-
body: lines.slice(2).join('\n').trim() || undefined
110+
body: bodyText || undefined
109111
};
110112
}
111113

0 commit comments

Comments
 (0)