Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Size label to level in github-actions #2

Merged
merged 1 commit into from
Jan 13, 2023
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 = ['level', 'role', 'Feature']
const LABEL_MISSING = ['level: missing', 'role missing', 'Feature Missing']
const LEVEL_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 level exceptions array, it also fulfills the level requirements
if (LEVEL_EXCEPTIONS.includes(label) && requiredLabel === 'level') {
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',
'level: missing': 'level',
'role missing': 'Role',
'Feature Missing': 'Feature'
}
Expand Down