Summary
Wire up ensureLabelsExist() into the createIssue() flow so labels are auto-verified/created before gh issue create.
Context
Child issue of #12. Depends on #13 (ensureLabelsExist implementation).
Implementation Details
Changes to createIssue() in src/utils/github.ts
Before the gh issue create command is assembled, add:
let validLabels = labels
if (labels && labels.length > 0) {
validLabels = await ensureLabelsExist(labels, repo)
}
if (validLabels && validLabels.length > 0) {
args.push('--label', validLabels.join(','))
}
This replaces the current block at ~line 271:
if (labels && labels.length > 0) {
args.push('--label', labels.join(','))
}
Acceptance Criteria
Summary
Wire up
ensureLabelsExist()into thecreateIssue()flow so labels are auto-verified/created beforegh issue create.Context
Child issue of #12. Depends on #13 (ensureLabelsExist implementation).
Implementation Details
Changes to
createIssue()insrc/utils/github.tsBefore the
gh issue createcommand is assembled, add:This replaces the current block at ~line 271:
Acceptance Criteria
createIssue()callsensureLabelsExist()when labels are providedgh issue createcreateIssueInRepo()wrapper also benefits (delegates tocreateIssue())