From 071fde111b246e403c5277dd2953bdddf853d577 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 12 Jun 2026 11:25:14 +0200 Subject: [PATCH] Add manually-triggered workflow to remove PendingRelease label from all issues --- .github/workflows/remove-pending-release.yml | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/remove-pending-release.yml diff --git a/.github/workflows/remove-pending-release.yml b/.github/workflows/remove-pending-release.yml new file mode 100644 index 0000000000..2a45f7a816 --- /dev/null +++ b/.github/workflows/remove-pending-release.yml @@ -0,0 +1,31 @@ +name: Remove label 'PendingRelease' from all issues +on: + workflow_dispatch: +jobs: + remove_label: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/github-script@v9 + with: + script: | + const label = "PendingRelease"; + const issues = await github.paginate(github.rest.issues.listForRepo, { + owner: context.repo.owner, + repo: context.repo.repo, + state: "all", + labels: label, + per_page: 100 + }); + core.info(`Found ${issues.length} issue(s) with label '${label}'`); + for (const issue of issues) { + await github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + name: label + }); + core.info(`Removed '${label}' from #${issue.number}`); + } + core.info(`Done. Removed '${label}' from ${issues.length} issue(s).`);