Skip to content

Commit

Permalink
fix: Handle error when label is not available (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed May 10, 2024
1 parent e77c7ed commit 6d74047
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Expand Up @@ -29880,7 +29880,7 @@ function removeLabelIfExists(labelName_1, issue_1, _a) {
.then(() => true, (error) => {
if ((error.status === 403 || error.status === 404) &&
continueOnMissingPermissions() &&
error.message.endsWith(`Resource not accessible by integration`)) {
error.message.includes(`Resource not accessible by integration`)) {
core.warning(`could not remove label "${labelName}": ${commonErrorDetailedMessage}`);
}
else if (error.status !== 404) {
Expand Down
2 changes: 1 addition & 1 deletion sources/main.ts
Expand Up @@ -307,7 +307,7 @@ async function removeLabelIfExists(
if (
(error.status === 403 || error.status === 404) &&
continueOnMissingPermissions() &&
error.message.endsWith(`Resource not accessible by integration`)
error.message.includes(`Resource not accessible by integration`)
) {
core.warning(
`could not remove label "${labelName}": ${commonErrorDetailedMessage}`,
Expand Down

0 comments on commit 6d74047

Please sign in to comment.