-
Notifications
You must be signed in to change notification settings - Fork 1
122 lines (106 loc) · 3.41 KB
/
label.yml
File metadata and controls
122 lines (106 loc) · 3.41 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: "Advanced Futuristic Label Automation"
on:
issues:
types: [opened, edited, labeled, unlabeled]
pull_request:
types: [opened, edited, labeled, unlabeled, synchronize]
schedule:
- cron: '0 3 * * *' # Daily sync at 03:00 UTC
workflow_dispatch:
jobs:
sync_labels:
name: "Sync & Protect Labels"
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
pull-requests: write
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Sync labels from config"
uses: EndBug/label-sync@v3
with:
config-file: .github/labels.json
delete-other-labels: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Protect critical labels"
run: |
gh label edit "critical" --description "Critical issues/blockers" --color "b60205" || true
gh label edit "security" --description "Security vulnerabilities" --color "d73a4a" || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ai_labeler:
name: "AI-Powered Label Suggestions"
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: "AI Labeler"
uses: github/issue-labeler@v4
with:
configuration-path: .github/labeler.yml
enable-versioned-regex: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
multilingual_labeling:
name: "Multilingual Issue Labeling"
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: "Detect and label language"
uses: alexeygrigorev/labeler-language@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
auto_label_pr:
name: "Autolabel PRs Based on File Paths"
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: "Path-based PR Labeler"
uses: github/auto-label@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/pr-labeler.yml
suggest_labels:
name: "Suggest New/Future Labels"
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: "Suggest relevant AI-driven labels"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const openAI = require('@openai/openai');
const issue = context.payload.issue || context.payload.pull_request;
const body = issue.body || '';
// Hypothetical AI integration for futuristic label suggestions
const aiLabels = await openAI.labels.suggest({ text: body, repo: context.repo });
for (const label of aiLabels) {
await github.issues.addLabels({
...context.repo,
issue_number: issue.number,
labels: [label]
});
}
label_compliance:
name: "Label Compliance & Analytics"
runs-on: ubuntu-latest
permissions:
issues: read
pull-requests: read
steps:
- name: "Run label analytics"
uses: github/label-actions@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
config-path: .github/label-actions.yml
# labeler.yml, labels.json, pr-labeler.yml, and label-actions.yml
# should be defined in .github/ for full functionality.