From aef8a7368a6d764266aa821ae9a0bdff5da0dc52 Mon Sep 17 00:00:00 2001 From: lonewolfyx Date: Thu, 27 Aug 2026 22:26:08 +0800 Subject: [PATCH] fix(bug-cli): integrate config resolution for bug creation - Import resolveConfig function from config module - Replace direct args usage with resolved config object - Map bug arguments to config properties before creating bug - Pass unified config object to createBug function instead of raw args --- src/commands/bug-cli.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/commands/bug-cli.ts b/src/commands/bug-cli.ts index ba9da36..c739143 100644 --- a/src/commands/bug-cli.ts +++ b/src/commands/bug-cli.ts @@ -2,6 +2,7 @@ import { defineCommand } from 'citty' import { bugArgs } from '@/args/bug.ts' import { defaultArgs } from '@/args/default.ts' import { createBug } from '@/commands/bug.ts' +import { resolveConfig } from '@/config.ts' import { ANTDV_REPO_CLI } from '@/constants/repo.ts' export default defineCommand({ @@ -14,6 +15,15 @@ export default defineCommand({ ...bugArgs, }, async run({ args }) { - await createBug(ANTDV_REPO_CLI, args) + const config = resolveConfig(args) + config.title = args.title + config.reproduction = args.reproduction + config.steps = args.steps + config.expected = args.expected + config.actual = args.actual + config.extra = args.extra + config.submit = args.submit + + await createBug(ANTDV_REPO_CLI, config) }, })