Skip to content

Commit

Permalink
fix bug with regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
burkov committed Feb 10, 2020
1 parent 65c868f commit d236d9d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,8 @@ const main = async () => {

const issues = stdout
.split('\n')
.map((l) => {
let result = /(JPF-[0-9]+)/.exec(l);
return result ? result[1] : undefined;
})
.filter((e) => e !== undefined);
.flatMap((line) => line.match(/jpf-\d{1,6}/ig) || [])
.map((x) => x.toUpperCase());

console.log(chalk.green(`Fetching YT issue statuses for ${issues.length} branches...`));
program.sort = !program.noSort;
Expand Down

0 comments on commit d236d9d

Please sign in to comment.