From 74b5c2aa56e4cccd227f96a3cd36f66261f86b76 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 30 May 2023 13:56:00 -0400 Subject: [PATCH] issue-comment-created: Add guard for labels The action currently fails when trying to remove the stale or waiting-reply labels from issues that do not actually contain the labels in question. This update adds a guard clause to only run the action on issues containing at least one of the labels. --- .github/workflows/issue-comment-created.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/issue-comment-created.yml b/.github/workflows/issue-comment-created.yml index e28ac0d09..a5c112d2a 100644 --- a/.github/workflows/issue-comment-created.yml +++ b/.github/workflows/issue-comment-created.yml @@ -12,6 +12,7 @@ jobs: permissions: contents: read # for actions/checkout to fetch code issues: write # for actions-ecosystem/action-remove-labels to remove issue labels + if: ${{contains(github.event.issue.labels.*.name, 'waiting-reply') || contains(github.event.issue.labels.*.name, 'stale')}} runs-on: ubuntu-latest steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3