From 8e498e3f7669352d258f1c7bed754108a00e36d7 Mon Sep 17 00:00:00 2001 From: GalaxyGamingFR <153150716+GalaxyGamingFR@users.noreply.github.com> Date: Wed, 14 Oct 2026 00:55:49 -0700 Subject: [PATCH] fix(ci): clear the stale label once a PR is rebased Stale conflicts runs actions/stale with only-pr-labels: needs rebase. actions/stale skips any PR without all only-labels before it looks at remove-pr-stale-when-updated, so after a rebase removes needs rebase the PR is never processed again and keeps its stale label for good. A step before actions/stale now removes stale from open PRs that no longer carry needs rebase. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012zyXkUzTZGh3nBwNMtrLaW --- .github/workflows/stale-conflicts.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/stale-conflicts.yml b/.github/workflows/stale-conflicts.yml index 4eee09a40e..00150e1b70 100644 --- a/.github/workflows/stale-conflicts.yml +++ b/.github/workflows/stale-conflicts.yml @@ -14,6 +14,14 @@ jobs: issues: write pull-requests: write steps: + - env: + GH_TOKEN: ${{ github.token }} + run: | + gh pr list -R "$GITHUB_REPOSITORY" --label stale -L 1000 --json number,labels \ + --jq '.[] | select(all(.labels[]; .name != "needs rebase")) | .number' | + while read -r number; do + gh api -X DELETE "repos/$GITHUB_REPOSITORY/issues/$number/labels/stale" --silent + done - uses: actions/stale@v11 with: only-pr-labels: needs rebase