Skip to content

Commit b220ec1

Browse files
Andy-Jostclaude
andcommitted
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 <[email protected]>
1 parent 65935f1 commit b220ec1

3 files changed

Lines changed: 87 additions & 2 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# When the author of an issue labeled "awaiting-response" comments, remove that label (and
6+
# "stale", if present) so that the issue returns to the triage queue.
7+
8+
name: "Triage: remove awaiting-response on author reply"
9+
10+
on:
11+
issue_comment:
12+
types:
13+
- created
14+
15+
permissions: {}
16+
17+
jobs:
18+
remove-awaiting-response:
19+
if: >-
20+
${{
21+
(github.repository_owner == 'nvidia' || github.repository_owner == 'nvidia-dev') &&
22+
!github.event.issue.pull_request &&
23+
github.event.comment.user.login == github.event.issue.user.login &&
24+
contains(github.event.issue.labels.*.name, 'awaiting-response')
25+
}}
26+
runs-on: ubuntu-latest
27+
permissions:
28+
issues: write
29+
steps:
30+
- name: Remove awaiting-response
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
GH_REPO: ${{ github.repository }}
34+
NUMBER: ${{ github.event.issue.number }}
35+
HAS_STALE: ${{ contains(github.event.issue.labels.*.name, 'stale') }}
36+
run: |
37+
set -euo pipefail
38+
args=(--remove-label awaiting-response)
39+
if [[ "$HAS_STALE" == "true" ]]; then
40+
args+=(--remove-label stale)
41+
fi
42+
gh issue edit "$NUMBER" "${args[@]}"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Close issues that wait on their reporter. An issue labeled "awaiting-response" with no
6+
# activity for 7 days gets a warning and the "stale" label; 7 days after the warning it closes
7+
# as not planned. Any activity removes "stale" and restarts the clock. Pull requests are never
8+
# touched.
9+
10+
name: "Triage: close issues awaiting response"
11+
12+
on:
13+
schedule:
14+
- cron: "17 6 * * *"
15+
workflow_dispatch:
16+
17+
permissions: {}
18+
19+
jobs:
20+
close-awaiting-response:
21+
if: ${{ github.repository_owner == 'nvidia' || github.repository_owner == 'nvidia-dev' }}
22+
runs-on: ubuntu-latest
23+
permissions:
24+
actions: write
25+
issues: write
26+
steps:
27+
- name: Warn and close issues awaiting response
28+
uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
29+
with:
30+
only-issue-labels: awaiting-response
31+
days-before-issue-stale: 7
32+
days-before-issue-close: 7
33+
days-before-pr-stale: -1
34+
days-before-pr-close: -1
35+
stale-issue-label: stale
36+
close-issue-reason: not_planned
37+
stale-issue-message: >-
38+
This issue has waited 7 days for the information we asked for.
39+
It will close in 7 days unless there is a reply.
40+
Comment here to keep it open.
41+
close-issue-message: >-
42+
Closing because we did not hear back.
43+
Comment here with the requested information and we'll reopen it.

‎.github/workflows/triagelabel.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
triage:
15-
if: ${{ github.repository_owner == 'nvidia' }}
15+
if: ${{ github.repository_owner == 'nvidia' || github.repository_owner == 'nvidia-dev' }}
1616
runs-on: ubuntu-latest
1717
permissions:
1818
issues: write

0 commit comments

Comments
 (0)