diff --git a/dist/index.js b/dist/index.js index 825d187..6610c8a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -36944,7 +36944,8 @@ try { // Temp environments enabled if (github.context.eventName === "pull_request") { const prEvent = github.context.payload; - const targetLabel = value.label || prEvent.label?.name; + const targetLabel = value.label; + if (!targetLabel) continue; const hasLabel = (prEvent.action === "labeled" && prEvent.label.name === targetLabel) || diff --git a/src/index.js b/src/index.js index 2ae1444..60d5f0d 100644 --- a/src/index.js +++ b/src/index.js @@ -31,7 +31,8 @@ try { // Temp environments enabled if (github.context.eventName === "pull_request") { const prEvent = github.context.payload; - const targetLabel = value.label || prEvent.label?.name; + const targetLabel = value.label; + if (!targetLabel) continue; const hasLabel = (prEvent.action === "labeled" && prEvent.label.name === targetLabel) ||