Skip to content

Commit 54df610

Browse files
authored
fix(bug-cli): integrate config resolution for bug creation (#61)
- 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
1 parent 9e6fce0 commit 54df610

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/commands/bug-cli.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineCommand } from 'citty'
22
import { bugArgs } from '@/args/bug.ts'
33
import { defaultArgs } from '@/args/default.ts'
44
import { createBug } from '@/commands/bug.ts'
5+
import { resolveConfig } from '@/config.ts'
56
import { ANTDV_REPO_CLI } from '@/constants/repo.ts'
67

78
export default defineCommand({
@@ -14,6 +15,15 @@ export default defineCommand({
1415
...bugArgs,
1516
},
1617
async run({ args }) {
17-
await createBug(ANTDV_REPO_CLI, args)
18+
const config = resolveConfig(args)
19+
config.title = args.title
20+
config.reproduction = args.reproduction
21+
config.steps = args.steps
22+
config.expected = args.expected
23+
config.actual = args.actual
24+
config.extra = args.extra
25+
config.submit = args.submit
26+
27+
await createBug(ANTDV_REPO_CLI, config)
1828
},
1929
})

0 commit comments

Comments
 (0)