Skip to content

Commit b06db61

Browse files
panvaaduh95
authored andcommitted
fix(ncu-ci): only filter main branch when it's the only one
1 parent 281ce54 commit b06db61

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎lib/ci/failure_aggregator.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ function formatTargetBranches(pr, markdown = false) {
3131
if (pr.targetBranches.length === 1 && pr.targetBranches[0] === 'main') {
3232
return '';
3333
}
34-
const branches = pr.targetBranches.map(branch => markdown
35-
? branch.replace(/[&<>"'\\`*_[\]{}()!|~]/g, char => `&#${char.charCodeAt(0)};`)
36-
: branch);
37-
return branches.length ? ` (target: ${branches.join(', ')})` : '';
34+
const branches = markdown
35+
? pr.targetBranches.map(branch =>
36+
branch.replace(/[&<>"'\\`*_[\]{}()!|~]/g, char => `&#${char.charCodeAt(0)};`))
37+
: pr.targetBranches;
38+
return ` (target: ${branches.join(', ')})`;
3839
}
3940

4041
export class FailureAggregator {

0 commit comments

Comments
 (0)