Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var fs = require("fs")

// Constant variables
const LABELS_OBJ = {
'size: missing': 'Size',
'Complexity: Missing': 'Complexity',
'role missing': 'Role',
'Feature Missing': 'Feature'
}
Expand Down