diff --git a/dist/index.js b/dist/index.js index 6b20c354..298d5c89 100644 --- a/dist/index.js +++ b/dist/index.js @@ -45227,7 +45227,9 @@ async function enforceRequiredLabels(octokit, context, target, options = {}) { await apply(octokit, context, issueNumber, rule, labels); } catch (e) { - errors.push(`${rule.missing_label}: ${e instanceof Error ? e.message : e}`); + // every await in apply() rewraps its rejection in new Error (labelIssue, removeLabels, createComment, + // botCommentsWithMarker, deleteMissingComments), so only an Error reaches this catch from the bundle + errors.push(`${rule.missing_label}: ${e instanceof Error ? e.message : /* v8 ignore next -- non-Error arm unreachable from dist/index.js; requireMatchingLabel.test.ts drives it */ e}`); } } if (errors.length > 0) { diff --git a/src/plugins/requireMatchingLabel.ts b/src/plugins/requireMatchingLabel.ts index b2b8211c..9b10f5fc 100644 --- a/src/plugins/requireMatchingLabel.ts +++ b/src/plugins/requireMatchingLabel.ts @@ -164,7 +164,9 @@ export async function enforceRequiredLabels(octokit: Octokit, context: Context, await apply(octokit, context, issueNumber, rule, labels) } catch (e) { - errors.push(`${rule.missing_label}: ${e instanceof Error ? e.message : e}`) + // every await in apply() rewraps its rejection in new Error (labelIssue, removeLabels, createComment, + // botCommentsWithMarker, deleteMissingComments), so only an Error reaches this catch from the bundle + errors.push(`${rule.missing_label}: ${e instanceof Error ? e.message : /* v8 ignore next -- non-Error arm unreachable from dist/index.js; requireMatchingLabel.test.ts drives it */ e}`) } }