Skip to content

Commit ce17758

Browse files
committed
Only convert case of labels if useLowerCaseLabels is set
1 parent aff6379 commit ce17758

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/githubHelper.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,10 @@ export default class GithubHelper {
284284
let lower = l.toLowerCase();
285285
// ignore any labels that should have been removed when the issue was closed
286286
return lower !== 'doing' && lower !== 'to do';
287-
}).map((el : string) => el.toLowerCase());
287+
});
288+
if (settings.conversion.useLowerCaseLabels) {
289+
props.labels = props.labels.map((el : string) => el.toLowerCase());
290+
}
288291
}
289292

290293
//
@@ -364,7 +367,10 @@ export default class GithubHelper {
364367
let lower = l.toLowerCase();
365368
// ignore any labels that should have been removed when the issue was closed
366369
return lower !== 'doing' && lower !== 'to do';
367-
}).map((el : string) => el.toLowerCase());
370+
});
371+
if (settings.conversion.useLowerCaseLabels) {
372+
props.labels = props.labels.map((el : string) => el.toLowerCase());
373+
}
368374
}
369375

370376
//
@@ -376,7 +382,7 @@ export default class GithubHelper {
376382
if (props.body && props.body.indexOf('/uploads/') > -1 && !settings.s3) {
377383
props.labels.push('has attachment');
378384
}
379-
385+
380386
// Is this OK? It will just return the argument
381387
if (settings.debug) return Promise.resolve({ data: issue });
382388

@@ -466,6 +472,8 @@ export default class GithubHelper {
466472
if (result.data.status === "failed") {
467473
console.log("\tFAILED: ");
468474
console.log(result);
475+
console.log("\tERRORS:")
476+
console.log(result.data.errors);
469477
return null;
470478
}
471479

0 commit comments

Comments
 (0)