diff options
| author | Aiden Cline <[email protected]> | 2025-11-03 16:17:53 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-11-03 16:17:53 -0600 |
| commit | c1f9249c84368ad0c16c68e44db3df0d3ff2b7b0 (patch) | |
| tree | 9f58a361ad3684b02ac40ec25c5ce72aec9afc96 /.github/workflows | |
| parent | 9bb66946dbe6d2ab0040b784b5428df1c4245283 (diff) | |
| download | opencode-c1f9249c84368ad0c16c68e44db3df0d3ff2b7b0.tar.gz opencode-c1f9249c84368ad0c16c68e44db3df0d3ff2b7b0.zip | |
ci: auto label web
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/auto-label-tui.yml | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/.github/workflows/auto-label-tui.yml b/.github/workflows/auto-label-tui.yml index 2b5379b81..834562e17 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, |
