Skip to content

Commit 6d74047

Browse files
authored
fix: Handle error when label is not available (#123)
1 parent e77c7ed commit 6d74047

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29880,7 +29880,7 @@ function removeLabelIfExists(labelName_1, issue_1, _a) {
2988029880
.then(() => true, (error) => {
2988129881
if ((error.status === 403 || error.status === 404) &&
2988229882
continueOnMissingPermissions() &&
29883-
error.message.endsWith(`Resource not accessible by integration`)) {
29883+
error.message.includes(`Resource not accessible by integration`)) {
2988429884
core.warning(`could not remove label "${labelName}": ${commonErrorDetailedMessage}`);
2988529885
}
2988629886
else if (error.status !== 404) {

sources/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ async function removeLabelIfExists(
307307
if (
308308
(error.status === 403 || error.status === 404) &&
309309
continueOnMissingPermissions() &&
310-
error.message.endsWith(`Resource not accessible by integration`)
310+
error.message.includes(`Resource not accessible by integration`)
311311
) {
312312
core.warning(
313313
`could not remove label "${labelName}": ${commonErrorDetailedMessage}`,

0 commit comments

Comments
 (0)