Skip to content

Commit

Permalink
Update check-labels.js
Browse files Browse the repository at this point in the history
Update to test Bitian's hackforla#3109
  • Loading branch information
t-will-gillis authored Jan 25, 2023
1 parent e1f6dba commit 2f30fda
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Constant variables
const REQUIRED_LABELS = ['Size', 'role', 'Feature']
const LABEL_MISSING = ['size: missing', 'role missing', 'Feature Missing']
const SIZE_EXCEPTIONS = ['good first issue']
const REQUIRED_LABELS = ['Complexity', 'role', 'Feature']
const LABEL_MISSING = ['Complexity Missing', 'role missing', 'Feature Missing']
const COMPLEXITY_EXCEPTIONS = ['good first issue']

// Global variables
var github
Expand Down Expand Up @@ -62,8 +62,8 @@ function checkLabels(labels) {
REQUIRED_LABELS.forEach((requiredLabel, i) => {
const regExp = new RegExp(`\\b${requiredLabel}\\b`, 'gi')
const isLabelPresent = labels.some(label => {
// If the label is in the size exceptions array, it also fulfills the size requirements
if (SIZE_EXCEPTIONS.includes(label) && requiredLabel === 'Size') {
// If the label is in the complexity exceptions array, it also fulfills the complexity requirements
if (COMPLEXITY_EXCEPTIONS.includes(label) && requiredLabel === 'Complexity') {
return true
}

Expand Down Expand Up @@ -111,4 +111,4 @@ async function addLabels(labelsToAdd, currentLabels) {
}
}

module.exports = main
module.exports = main

0 comments on commit 2f30fda

Please sign in to comment.