Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit c1f9249

Browse files
committed
ci: auto label web
1 parent 9bb6694 commit c1f9249

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

.github/workflows/auto-label-tui.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
contents: read
1212
issues: write
1313
steps:
14-
- name: Add opentui label
14+
- name: Auto-label and assign issues
1515
uses: actions/github-script@v7
1616
with:
1717
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -20,10 +20,32 @@ jobs:
2020
const title = issue.title;
2121
const description = issue.body || '';
2222
23+
// Check for web/desktop keywords
24+
const webPattern = /\b(web|desktop)\b/i;
25+
const isWebRelated = webPattern.test(title) || webPattern.test(description);
26+
2327
// Check for version patterns like v1.0.x or 1.0.x
2428
const versionPattern = /[v]?1\.0\./i;
29+
const isVersionRelated = versionPattern.test(title) || versionPattern.test(description);
2530
26-
if (versionPattern.test(title) || versionPattern.test(description)) {
31+
if (isWebRelated) {
32+
// Add web label
33+
await github.rest.issues.addLabels({
34+
owner: context.repo.owner,
35+
repo: context.repo.repo,
36+
issue_number: issue.number,
37+
labels: ['web']
38+
});
39+
40+
// Assign to adamdotdevin
41+
await github.rest.issues.addAssignees({
42+
owner: context.repo.owner,
43+
repo: context.repo.repo,
44+
issue_number: issue.number,
45+
assignees: ['adamdotdevin']
46+
});
47+
} else if (isVersionRelated) {
48+
// Only add opentui if NOT web-related
2749
await github.rest.issues.addLabels({
2850
owner: context.repo.owner,
2951
repo: context.repo.repo,

0 commit comments

Comments
 (0)