From 8d5d0191c42851b33620505383712046674b4a47 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Wed, 23 Oct 2024 09:13:03 -0400 Subject: [PATCH 1/2] meta: allow users to reopen stale issues via commands --- .github/workflows/comment-commands.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/comment-commands.yml diff --git a/.github/workflows/comment-commands.yml b/.github/workflows/comment-commands.yml new file mode 100644 index 00000000000000..fdec053d7e23cb --- /dev/null +++ b/.github/workflows/comment-commands.yml @@ -0,0 +1,26 @@ +name: "Comment Commands" + +on: + issue_comment: + types: [created] + +permissions: + pull-requests: write + issues: write + +jobs: + reopen_and_disable_stale: + runs-on: ubuntu-latest + if: > + github.repository == 'nodejs/node' && + github.event.comment.body == '/reopen-stale' && + contains(github.event.issue.labels.*.name, 'stale') && + github.event.issue.state == 'closed' + + steps: + - name: Reopen issue + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + run: | + gh issue reopen "$ISSUE_NUMBER" --repo ${{ github.repository }} From 9461ef179c375f0d01b1dcc04d5aabcfc63a4ea9 Mon Sep 17 00:00:00 2001 From: RedYetiDev <38299977+RedYetiDev@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:30:03 -0400 Subject: [PATCH 2/2] fixup! meta: allow users to reopen stale issues via commands --- .github/workflows/comment-commands.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/comment-commands.yml b/.github/workflows/comment-commands.yml index fdec053d7e23cb..425c262c5ce4be 100644 --- a/.github/workflows/comment-commands.yml +++ b/.github/workflows/comment-commands.yml @@ -1,4 +1,4 @@ -name: "Comment Commands" +name: Comment Commands on: issue_comment: @@ -9,14 +9,14 @@ permissions: issues: write jobs: - reopen_and_disable_stale: + reopen-stale: runs-on: ubuntu-latest if: > github.repository == 'nodejs/node' && github.event.comment.body == '/reopen-stale' && contains(github.event.issue.labels.*.name, 'stale') && github.event.issue.state == 'closed' - + steps: - name: Reopen issue env: