Skip to content

Commit

Permalink
Update issue-comment.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha authored Feb 20, 2024
1 parent 50e5944 commit 2f27e63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/issue-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ jobs:
});
const isStale = issue.labels.some(label => label.name === 'stale');
console.log("isStale: " + isStale);
if (isStale) return false;
const waitingResponseLabel = issue.labels.find(label => label.name === 'waiting for user response');
console.log("waitingResponseLabel: " + waitingResponseLabel);
if (!waitingResponseLabel) return false;
const { data: comments } = await github.rest.issues.listComments({
Expand All @@ -35,9 +37,10 @@ jobs:
});
const lastComment = comments[comments.length - 1];
console.log("lastComment: " + lastComment);
if (!lastComment.user) return false;
return lastComment.user.login !== waitingResponseLabel.user?.login;
return lastComment.user.login !== waitingResponseLabel.user.login;
# only remove the label if the issue is not stale, this prevents that this
# action removes the label when the automatic reminder message gets sent.
- name: Remove `waiting for user response` label if exists
Expand Down

0 comments on commit 2f27e63

Please sign in to comment.