From b220ec138e24bc1e0f169b7068755bfe437499a2 Mon Sep 17 00:00:00 2001 From: Andy Jost Date: Mon, 2 Nov 2026 11:55:25 -0800 Subject: [PATCH] ci: automate the awaiting-response triage label Add two issue-triage workflows: - triage-close-awaiting-response.yml: a daily actions/stale run on issues labeled awaiting-response. After 7 days without activity it posts a warning and adds "stale"; 7 days later it closes the issue as not planned. Pull requests are never touched. - triage-author-reply.yml: when the issue author comments on an issue labeled awaiting-response, remove that label (and "stale") so that the issue returns to the triage queue. Both run in NVIDIA and NVIDIA-dev. Extend the owner check of triagelabel.yml to NVIDIA-dev as well: the private mirror carries this file, but its owner check matched only "nvidia", so it never ran there. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/triage-author-reply.yml | 42 ++++++++++++++++++ .../triage-close-awaiting-response.yml | 43 +++++++++++++++++++ .github/workflows/triagelabel.yml | 4 +- 3 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/triage-author-reply.yml create mode 100644 .github/workflows/triage-close-awaiting-response.yml diff --git a/.github/workflows/triage-author-reply.yml b/.github/workflows/triage-author-reply.yml new file mode 100644 index 00000000000..fb3595411cc --- /dev/null +++ b/.github/workflows/triage-author-reply.yml @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +# When the author of an issue labeled "awaiting-response" comments, remove that label (and +# "stale", if present) so that the issue returns to the triage queue. + +name: "Triage: remove awaiting-response on author reply" + +on: + issue_comment: + types: + - created + +permissions: {} + +jobs: + remove-awaiting-response: + if: >- + ${{ + (github.repository_owner == 'nvidia' || github.repository_owner == 'nvidia-dev') && + !github.event.issue.pull_request && + github.event.comment.user.login == github.event.issue.user.login && + contains(github.event.issue.labels.*.name, 'awaiting-response') + }} + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Remove awaiting-response + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + HAS_STALE: ${{ contains(github.event.issue.labels.*.name, 'stale') }} + run: | + set -euo pipefail + args=(--remove-label awaiting-response) + if [[ "$HAS_STALE" == "true" ]]; then + args+=(--remove-label stale) + fi + gh issue edit "$NUMBER" "${args[@]}" diff --git a/.github/workflows/triage-close-awaiting-response.yml b/.github/workflows/triage-close-awaiting-response.yml new file mode 100644 index 00000000000..5dae438e31a --- /dev/null +++ b/.github/workflows/triage-close-awaiting-response.yml @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +# Close issues that wait on their reporter. An issue labeled "awaiting-response" with no +# activity for 7 days gets a warning and the "stale" label; 7 days after the warning it closes +# as not planned. Any activity removes "stale" and restarts the clock. Pull requests are never +# touched. + +name: "Triage: close issues awaiting response" + +on: + schedule: + - cron: "17 6 * * *" + workflow_dispatch: + +permissions: {} + +jobs: + close-awaiting-response: + if: ${{ github.repository_owner == 'nvidia' || github.repository_owner == 'nvidia-dev' }} + runs-on: ubuntu-latest + permissions: + actions: write + issues: write + steps: + - name: Warn and close issues awaiting response + uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 + with: + only-issue-labels: awaiting-response + days-before-issue-stale: 7 + days-before-issue-close: 7 + days-before-pr-stale: -1 + days-before-pr-close: -1 + stale-issue-label: stale + close-issue-reason: not_planned + stale-issue-message: >- + This issue has waited 7 days for the information we asked for. + It will close in 7 days unless there is a reply. + Comment here to keep it open. + close-issue-message: >- + Closing because we did not hear back. + Comment here with the requested information and we'll reopen it. diff --git a/.github/workflows/triagelabel.yml b/.github/workflows/triagelabel.yml index a1e7eafe190..5b6a6eaad6c 100644 --- a/.github/workflows/triagelabel.yml +++ b/.github/workflows/triagelabel.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ on: jobs: triage: - if: ${{ github.repository_owner == 'nvidia' }} + if: ${{ github.repository_owner == 'nvidia' || github.repository_owner == 'nvidia-dev' }} runs-on: ubuntu-latest permissions: issues: write