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 b839381 commit 50e5944
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/issue-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ jobs:
if (isStale) return false;
const waitingResponseLabel = issue.labels.find(label => label.name === 'waiting for user response');
if (waitingResponseLabel === undefined) return false;
if (!waitingResponseLabel) return false;
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
const lastComment = comments[comments.length - 1];
return lastComment.user.login !== waitingResponseLabel.user.login;
if (!lastComment.user) return false;
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 50e5944

Please sign in to comment.