-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (80 loc) · 3.19 KB
/
triage.yml
File metadata and controls
92 lines (80 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Issue Triage
on:
issues:
types: [opened, labeled]
permissions:
issues: write
contents: read
jobs:
auto-label:
runs-on: ubuntu-latest
if: github.event.action == 'opened'
steps:
- name: Add priority label based on keywords
uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
const body = (issue.body || '').toLowerCase();
const title = (issue.title || '').toLowerCase();
const text = title + ' ' + body;
// Auto-label based on content
const labels = [];
// Priority detection
if (text.includes('critical') || text.includes('urgent') || text.includes('broken')) {
labels.push('priority:high');
}
// Component detection
if (text.includes('plugin-dev')) labels.push('plugin:plugin-dev');
if (text.includes('llmstxt')) labels.push('plugin:llmstxt');
if (text.includes('openclaw')) labels.push('plugin:openclaw-docs');
if (text.includes('documentation') || text.includes('docs')) labels.push('docs');
if (text.includes('test') || text.includes('ci/cd') || text.includes('github actions')) labels.push('testing');
// Add labels if any detected
if (labels.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: labels
});
}
notify-on-priority:
runs-on: ubuntu-latest
if: github.event.action == 'labeled' && github.event.label.name == 'priority:high'
steps:
- name: Comment on high priority issue
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: '🚨 This issue has been marked as high priority and will be reviewed soon.'
});
welcome-first-issue:
runs-on: ubuntu-latest
if: github.event.action == 'opened'
steps:
- name: Welcome first-time contributors
uses: actions/github-script@v7
with:
script: |
const issueCreator = context.payload.issue.user.login;
// Check if this is their first issue
const issues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
creator: issueCreator,
state: 'all'
});
if (issues.data.length === 1) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `👋 Thanks for opening your first issue! We appreciate your contribution to improving the plugin marketplace.
Please make sure you've provided all the requested information in the template. A maintainer will review this soon.`
});
}