From 44b8a5cf0e4a8d942379a806fa26ab02545fa229 Mon Sep 17 00:00:00 2001 From: andig Date: Thu, 6 Aug 2026 17:18:07 +0200 Subject: [PATCH] ci: manage waiting for feedback label (#32577) --- .github/workflows/stale.yaml | 14 +++++++++- .github/workflows/waiting-feedback.yml | 36 ++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/waiting-feedback.yml diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index e3868063c..e02c245ca 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -20,5 +20,17 @@ jobs: with: days-before-stale: 7 days-before-close: 5 - exempt-issue-labels: "pinned,security,backlog,bug" + exempt-issue-labels: "pinned,security,backlog,bug,waiting for feedback" exempt-pr-labels: "pinned,security,backlog,bug" + + # issues without the requested feedback close after a week + - uses: actions/stale@v11 + id: waiting + with: + only-issue-labels: "waiting for feedback" + days-before-issue-stale: 7 + days-before-issue-close: 0 + days-before-pr-stale: -1 + days-before-pr-close: -1 + exempt-issue-labels: "pinned,security,backlog" + close-issue-message: "Closing since the requested feedback was not provided. You can still comment with requested feedback and we'll reopen." diff --git a/.github/workflows/waiting-feedback.yml b/.github/workflows/waiting-feedback.yml new file mode 100644 index 000000000..c76af8981 --- /dev/null +++ b/.github/workflows/waiting-feedback.yml @@ -0,0 +1,36 @@ +name: Waiting Feedback + +permissions: + issues: write + pull-requests: write + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + +jobs: + reset-label: + name: Reset Waiting Label + runs-on: ubuntu-latest + # only when the opener replies + if: github.event.comment.user.login == (github.event.issue.user.login || github.event.pull_request.user.login) + + steps: + - uses: actions/github-script@v9.0.0 + with: + script: | + const number = (context.payload.issue || context.payload.pull_request).number; + + try { + await github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: number, + name: 'waiting for feedback', + }); + } catch (err) { + // label not present + if (err.status !== 404) throw err; + }