@@ -2312,18 +2312,36 @@ export class Conductor {
23122312 const priorContext = contextParts . join ( '\n' ) ;
23132313
23142314 // Select template by issue type (labels or title heuristics)
2315- const templateDir = join ( __dirname , '..' , '..' , '..' , 'scripts' , 'conductor' , 'templates' ) ;
2315+ const templateDir = join (
2316+ __dirname ,
2317+ '..' ,
2318+ '..' ,
2319+ '..' ,
2320+ 'scripts' ,
2321+ 'conductor' ,
2322+ 'templates'
2323+ ) ;
23162324 const labelNames = issue . labels . map ( ( l ) => l . name . toLowerCase ( ) ) ;
23172325 let templateName = 'implement-feature.md' ;
2318- if ( labelNames . includes ( 'bug' ) || labelNames . includes ( 'fix' ) || / \b f i x \b | \b b u g \b / i. test ( issue . title ) ) {
2326+ if (
2327+ labelNames . includes ( 'bug' ) ||
2328+ labelNames . includes ( 'fix' ) ||
2329+ / \b f i x \b | \b b u g \b / i. test ( issue . title )
2330+ ) {
23192331 templateName = 'fix-bug.md' ;
2320- } else if ( labelNames . includes ( 'test' ) || labelNames . includes ( 'coverage' ) || / \b t e s t \b | \b c o v e r a g e \b / i. test ( issue . title ) ) {
2332+ } else if (
2333+ labelNames . includes ( 'test' ) ||
2334+ labelNames . includes ( 'coverage' ) ||
2335+ / \b t e s t \b | \b c o v e r a g e \b / i. test ( issue . title )
2336+ ) {
23212337 templateName = 'write-tests.md' ;
23222338 }
23232339
23242340 // Try typed template first, then custom template, then default
23252341 const typedTemplatePath = join ( templateDir , templateName ) ;
2326- const selectedPath = existsSync ( typedTemplatePath ) ? typedTemplatePath : templatePath ;
2342+ const selectedPath = existsSync ( typedTemplatePath )
2343+ ? typedTemplatePath
2344+ : templatePath ;
23272345
23282346 if ( existsSync ( selectedPath ) ) {
23292347 try {
@@ -2336,7 +2354,10 @@ export class Conductor {
23362354 . replace ( / \{ \{ D E S C R I P T I O N \} \} / g, issue . description || '' )
23372355 . replace ( / \{ \{ L A B E L S \} \} / g, labels )
23382356 . replace ( / \{ \{ P R I O R I T Y \} \} / g, priority )
2339- . replace ( / \{ \{ S C O P E \} \} / g, issue . identifier . toLowerCase ( ) . replace ( / - \d + $ / , '' ) )
2357+ . replace (
2358+ / \{ \{ S C O P E \} \} / g,
2359+ issue . identifier . toLowerCase ( ) . replace ( / - \d + $ / , '' )
2360+ )
23402361 . replace ( / \{ \{ A T T E M P T \} \} / g, String ( attempt ) )
23412362 . replace ( / \{ \{ P R I O R _ C O N T E X T \} \} / g, priorContext ) ;
23422363 return template ;
0 commit comments