Skip to content

Commit

Permalink
fix: Handle error when label is not available (part 2) (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik authored May 30, 2024
1 parent 6d74047 commit 9fd6d6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29851,7 +29851,7 @@ function addLabelIfNotExists(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 add label "${labelName}": ${commonErrorDetailedMessage}`);
}
else {
Expand Down Expand Up @@ -29906,7 +29906,7 @@ function addComment(comment_1, _a, _b) {
catch (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(`couldn't add comment "${comment}": ${commonErrorDetailedMessage}`);
}
else {
Expand Down
4 changes: 2 additions & 2 deletions sources/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ async function addLabelIfNotExists(
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 add label "${labelName}": ${commonErrorDetailedMessage}`,
Expand Down Expand Up @@ -340,7 +340,7 @@ async function addComment(
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(
`couldn't add comment "${comment}": ${commonErrorDetailedMessage}`,
Expand Down

0 comments on commit 9fd6d6d

Please sign in to comment.