From 024a10bbb507c109c6cefcd4e317c8368eb711b8 Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Wed, 19 Nov 2025 10:51:11 -0600 Subject: [PATCH] ci: auto label nix --- .github/workflows/auto-label-tui.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-label-tui.yml b/.github/workflows/auto-label-tui.yml index 8f2d80b59..0f03bb68d 100644 --- a/.github/workflows/auto-label-tui.yml +++ b/.github/workflows/auto-label-tui.yml @@ -28,14 +28,14 @@ jobs: const versionPattern = /[v]?1\.0\./i; const isVersionRelated = versionPattern.test(title) || versionPattern.test(description); + // Check for "nix" keyword + const nixPattern = /\bnix\b/i; + const isNixRelated = nixPattern.test(title) || nixPattern.test(description); + + const labels = []; + if (isWebRelated) { - // Add web label - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - labels: ['web'] - }); + labels.push('web'); // Assign to adamdotdevin await github.rest.issues.addAssignees({ @@ -46,10 +46,18 @@ jobs: }); } else if (isVersionRelated) { // Only add opentui if NOT web-related + labels.push('opentui'); + } + + if (isNixRelated) { + labels.push('nix'); + } + + if (labels.length > 0) { await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, - labels: ['opentui'] + labels: labels }); }