From b3d441550d20e357e15f4a8f4279c93ec6a6a987 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Fri, 8 May 2026 15:48:06 +0200 Subject: [PATCH] chore: update issue gate refactor message --- .github/workflows/issue-gate.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/issue-gate.yml b/.github/workflows/issue-gate.yml index ad4f911c..62018399 100644 --- a/.github/workflows/issue-gate.yml +++ b/.github/workflows/issue-gate.yml @@ -116,9 +116,9 @@ jobs: function buildRefactorGateMessage() { return [ - 'This issue was auto-closed. All issues will be closed until 2026-05-17 because the project is undergoing a large refactor.', + 'This issue was auto-closed. All issues will be closed until 2026-05-17 while the project refactor is being completed.', '', - `See the \`bigrefactor\` branch: https://github.com/${context.repo.owner}/${context.repo.repo}/tree/bigrefactor`, + `The refactor is happening on \`${defaultBranch}\`: https://github.com/${context.repo.owner}/${context.repo.repo}/tree/${defaultBranch}`, '', 'Issues closed during this period will not be reviewed. The reason is that the refactor will not get done otherwise, because issue triage has been taking about 8 hours per day.', '', @@ -137,7 +137,21 @@ jobs: const labelsToAdd = []; if (isFridayThroughSunday) labelsToAdd.push('closed-because-weekend'); - if (ISSUE_GATE_MESSAGE_MODE === 'refactor') labelsToAdd.push('closed-because-bigrefactor'); + if (ISSUE_GATE_MESSAGE_MODE === 'refactor') labelsToAdd.push('closed-because-refactor'); + + if (labelsToAdd.includes('closed-because-refactor')) { + try { + await github.rest.issues.createLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + name: 'closed-because-refactor', + color: '5319e7', + description: 'Closed while the project refactor is in progress', + }); + } catch (error) { + if (error.status !== 422) throw error; + } + } if (labelsToAdd.length > 0) { await github.rest.issues.addLabels({