Skip to content

Commit

Permalink
Update issue-comment.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Feb 6, 2024
1 parent 77d0b88 commit 01ea6b9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/issue-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,23 @@ jobs:
issues: write
pull-requests: write
steps:
- name: Check if issue has "question" label
id: check_stale
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: issue } = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
const hasLabel = issue.labels.some(label => label.name === 'stale');
return hasLabel;
# 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
if: steps.check_stale.outputs.result == 'false'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 01ea6b9

Please sign in to comment.