repo: Add 'refactor' to required PR labels

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2025-12-12 08:16:34 -06:00 committed by GitHub
parent d6a20c6a9f
commit 1bbb4aca62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,9 +24,9 @@ jobs:
pull_number: prNumber,
});
const latestLabels = pr.labels.map(label => label.name);
const requiredLabels = ['bugfix', 'enhancement', 'automation', 'dependencies', 'repo', 'release'];
const requiredLabels = ['bugfix', 'enhancement', 'automation', 'dependencies', 'repo', 'release', 'refactor'];
const hasRequiredLabel = latestLabels.some(label => requiredLabels.includes(label));
console.log('Latest labels:', latestLabels);
if (!hasRequiredLabel) {
core.setFailed(`PR must have at least one of the following labels before it can be merged: ${requiredLabels.join(', ')}.`);
}
}