Skip to content

Commit

Permalink
dotmatchall matches weren't working (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebknoll authored May 14, 2021
1 parent 0614f81 commit d4fe5c7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/azdo-pr-dashboard.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==

// @name More Awesome Azure DevOps (userscript)
// @version 3.0.1
// @version 3.0.2
// @author Alejandro Barreto (NI)
// @description Makes general improvements to the Azure DevOps experience, particularly around pull requests. Also contains workflow improvements for NI engineers.
// @license MIT
Expand Down Expand Up @@ -1159,11 +1159,12 @@
const knownBuildErrors = knownIssues.log_patterns;
for (let k = 0; k < knownBuildErrors.length; k += 1) {
if (knownBuildErrors[k].category === 'Infrastructure' && new RegExp(knownBuildErrors[k].pipeline_match).test(pipelineName)) {
let matchString = knownBuildErrors[k].match;
const matchString = knownBuildErrors[k].match;
let matchFlag = 'g';
if (knownBuildErrors[k].match_flag === 'dotmatchall') {
matchString = matchString.replace('.', '[\\s\\S]');
matchFlag = 'gs';
}
const matches = log.match(new RegExp(matchString, 'g')) || [];
const matches = log.match(new RegExp(matchString, matchFlag)) || [];
if (matches.length) {
let content = `${knownBuildErrors[k].cause} (x${matches.length})`;
if (knownBuildErrors[k].public_comment) {
Expand Down

0 comments on commit d4fe5c7

Please sign in to comment.