From c1f9249c84368ad0c16c68e44db3df0d3ff2b7b0 Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Mon, 3 Nov 2025 16:17:53 -0600 Subject: [PATCH] ci: auto label web --- .github/workflows/auto-label-tui.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-label-tui.yml b/.github/workflows/auto-label-tui.yml index 2b5379b8..834562e1 100644 --- a/.github/workflows/auto-label-tui.yml +++ b/.github/workflows/auto-label-tui.yml @@ -11,7 +11,7 @@ jobs: contents: read issues: write steps: - - name: Add opentui label + - name: Auto-label and assign issues uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -20,10 +20,32 @@ jobs: const title = issue.title; const description = issue.body || ''; + // Check for web/desktop keywords + const webPattern = /\b(web|desktop)\b/i; + const isWebRelated = webPattern.test(title) || webPattern.test(description); + // Check for version patterns like v1.0.x or 1.0.x const versionPattern = /[v]?1\.0\./i; + const isVersionRelated = versionPattern.test(title) || versionPattern.test(description); - if (versionPattern.test(title) || versionPattern.test(description)) { + if (isWebRelated) { + // Add web label + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: ['web'] + }); + + // Assign to adamdotdevin + await github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + assignees: ['adamdotdevin'] + }); + } else if (isVersionRelated) { + // Only add opentui if NOT web-related await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo,