infra: add posibility to skip issue validation

This commit is contained in:
Krzysztof Moch 2024-08-23 10:53:51 +02:00 committed by GitHub
parent 7db7024cb3
commit ffa5044e23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,6 +28,8 @@ const BOT_LABELS = [
...Object.values(PLATFORM_LABELS),
];
const SKIP_LABEL = "No Validation"
const MESSAGE = {
FEATURE_REQUEST: `Thank you for your feature request. We will review it and get back to you if we need more information.`,
BUG_REPORT: `Thank you for your bug report. We will review it and get back to you if we need more information.`,
@ -151,6 +153,11 @@ const handleIssue = async ({github, context}) => {
const {body} = issue;
const labels = new Set(issue.labels.map((label) => label.name));
if(labels.has(SKIP_LABEL)) {
console.log("Skiping Issue Validation")
return;
}
// Clear out labels that are added by the bot
BOT_LABELS.forEach((label) => labels.delete(label));