(entity, entityNumber, requiredLabels)
| 146 | getDetails: getIssueDetails, |
| 147 | |
| 148 | validateLabels(entity, entityNumber, requiredLabels) { |
| 149 | if (requiredLabels.length > 0) { |
| 150 | const issueLabels = entity.labels.map(/** @param {any} l */ l => (typeof l === "string" ? l : l.name || "")); |
| 151 | const missingLabels = requiredLabels.filter(required => !issueLabels.includes(required)); |
| 152 | if (missingLabels.length > 0) { |
| 153 | return { |
| 154 | valid: false, |
| 155 | warning: `Issue #${entityNumber} missing required labels: ${missingLabels.join(", ")}`, |
| 156 | error: `Missing required labels: ${missingLabels.join(", ")}`, |
| 157 | }; |
| 158 | } |
| 159 | } |
| 160 | return { valid: true }; |
| 161 | }, |
| 162 | |
| 163 | buildCommentBody(sanitizedBody) { |
| 164 | // Issues post the sanitized body directly without a workflow footer |
no outgoing calls
no test coverage detected