Skip to content

Commit

Permalink
Update check-labels.js
Browse files Browse the repository at this point in the history
address CodeQL concern for undeclared variable
  • Loading branch information
t-will-gillis authored Nov 4, 2024
1 parent 12dfe11 commit 404d50c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ function extractTemplateLabels() {
const match = templateBody.match(/<!--\s*labels:\s*'([^']*)'(?:,\s*'([^']*)')*\s*-->/);
if (!match) return [];

// Extract each label key, convert to label name, and return as an array
// Extract each labelKey, convert to labelName, and return as an array
let labelKeys = match[1].split(',').map(label => label.trim());
labels = labelKeys.map(labelKey => retrieveLabelDirectory(labelKey));
return labels
let labelNames = labelKeys.map(labelKey => retrieveLabelDirectory(labelKey));
return labelNames
}

/**
Expand Down

0 comments on commit 404d50c

Please sign in to comment.