From 80091232a767efd28277e90e008c643266e06577 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 12 Jul 2023 21:31:19 +0100 Subject: [PATCH] Add missing `env:`, tweak conditional Signed-off-by: Adam Warner --- .github/workflows/stale.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 0d06ee22..458a7fb6 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -32,8 +32,8 @@ jobs: remove_stale: # trigger "stale" removal immediately when stale issues are commented on # we need to explicitly check that the trigger does not run on comment on a PR as - # 'issue_comment' triggers on issues AND PR comments - if: github.event_name == 'issue_comment' && ${{ !github.event.issue.pull_request }} + # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment-on-issues-only-or-pull-requests-only + if: ${{ !github.event.issue.pull_request && github.event_name != 'schedule' }} permissions: contents: read # for actions/checkout issues: write # to edit issues label @@ -43,5 +43,6 @@ jobs: uses: actions/checkout@v3.5.2 - name: Remove 'stale' label run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }} + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}