Add manually-triggered workflow to remove PendingRelease label from all issues

This commit is contained in:
Magne Sjaastad committed 2026-06-12 11:28:42 +02:00
1 parent 091e9c3e64
commit 29b715bb46
1 file changed
+31
@@ -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).`);