Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: make ai fields to be optional #164

Merged
merged 1 commit into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cz-git/src/generator/questionAI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { generateAISubjects } from './message'

export async function generateAIPrompt(options: CommitizenGitOptions, cz: CommitizenType) {
const answers = await cz.prompt(generateAITypesQuestions(options))
console.log(style.green('β„Ή'), style.bold(options.messages!.generatingByAI))
console.log(style.green('β„Ή'), style.bold(options.messages!.generatingByAI!))
const subjects = await generateAISubjects(answers, options)
if (!Array.isArray(subjects))
throw new Error('subjects fetch value failed')
Expand Down
4 changes: 2 additions & 2 deletions packages/cz-git/src/shared/types/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ export interface Answers {
/**
* @default 'Generating your AI commit subject...'
*/
generatingByAI: string
generatingByAI?: string
/**
* @default 'Select suitable subject by AI generated:'
*/
generatedSelectByAI: string
generatedSelectByAI?: string
footerPrefix?: string
}

Expand Down
Loading