Update issue-checker.yml

This commit is contained in:
Eduard Ursu 2024-03-22 14:36:24 +01:00 committed by GitHub
parent b13a1f1cd7
commit 1e96e55457
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,9 +33,14 @@ jobs:
"Test Result:",
];
// Helper function to check if a required field is missing
// Helper function to check if a required field is actually filled
const isFieldMissing = (field) => {
return !issue.body.includes(field) || issue.body.includes(field + " ");
// Regex to find the field and any subsequent text
const fieldRegex = new RegExp(`${field}\\s*:\\s*(.+)`);
const match = issue.body.match(fieldRegex);
// Check if the field is present and has content after the colon
return !match || match[1].trim().length === 0;
};
// Find all missing fields