The best way to control Claude Code, Codex and more from any computer or phone
ci: label issues from vouched and denounced authors, denounce coygeek (#36021)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Nov 12, 2026 at 21:48 UTC
a32cdde062be006ac1411c7da6de75558dd51a70
3 files changed
+81
-3
.github/VOUCHED.td
+1
@@ -22,6 +22,7 @@ github:btsouth
22
github:cestercian
23
github:chrisdeeming
24
github:chuks-qua
25
+-github:coygeek Filed over 270 automated issues, about 50 a day at peak, far past what maintainers can triage
26
github:cursoragent
27
github:D3OXY
28
github:dbalders
.github/workflows/issue-vouch.yml
new
+77
@@ -0,0 +1,77 @@
1
+name: Issue Vouch
2
+
3
+on:
4
+ issues:
5
+ types: [opened, reopened]
6
+ push:
7
+ branches:
8
+ - main
9
+ paths:
10
+ - .github/VOUCHED.td
11
+ - .github/workflows/issue-vouch.yml
12
+ workflow_dispatch:
13
+
14
+permissions:
15
+ contents: read
16
+ issues: write
17
+
18
+concurrency:
19
+ group: issue-vouch-${{ github.event.issue.number || 'all' }}
20
+ cancel-in-progress: true
21
+
22
+jobs:
23
+ label:
24
+ name: Label issues by author trust
25
+ runs-on: ubuntu-24.04
26
+ steps:
27
+ - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
28
+ with:
29
+ script: |
30
+ const { owner, repo } = context.repo;
31
+ // Only listed authors get a label; open issues number in the thousands,
32
+ // so unvouched is the default and stays unlabelled.
33
+ const labelByStatus = { vouched: "vouch:trusted", denounced: "vouch:denounced" };
34
+ const managedLabelNames = new Set(["vouch:trusted", "vouch:unvouched", "vouch:denounced"]);
35
+
36
+ const { data: file } = await github.rest.repos.getContent({
37
+ owner,
38
+ repo,
39
+ path: ".github/VOUCHED.td",
40
+ ref: context.payload.repository.default_branch,
41
+ });
42
+ const statusByUser = new Map();
43
+ for (const raw of Buffer.from(file.content, "base64").toString("utf8").split("\n")) {
44
+ const match = /^(-?)github:(\S+)/.exec(raw.trim());
45
+ if (match) statusByUser.set(match[2].toLowerCase(), match[1] ? "denounced" : "vouched");
46
+ }
47
+
48
+ const issues =
49
+ context.eventName === "issues"
50
+ ? [context.payload.issue]
51
+ : (
52
+ await github.paginate(github.rest.issues.listForRepo, {
53
+ owner,
54
+ repo,
55
+ state: "open",
56
+ per_page: 100,
57
+ })
58
+ ).filter((issue) => !issue.pull_request);
59
+
60
+ for (const issue of issues) {
61
+ const status = statusByUser.get(issue.user.login.toLowerCase());
62
+ const next = labelByStatus[status];
63
+ const current = issue.labels.map((label) => label.name).filter((name) => managedLabelNames.has(name));
64
+
65
+ for (const name of current) {
66
+ if (name === next) continue;
67
+ try {
68
+ await github.rest.issues.removeLabel({ owner, repo, issue_number: issue.number, name });
69
+ } catch (error) {
70
+ if (error.status !== 404) throw error;
71
+ }
72
+ }
73
+ if (next && !current.includes(next)) {
74
+ await github.rest.issues.addLabels({ owner, repo, issue_number: issue.number, labels: [next] });
75
+ core.info(`Issue #${issue.number} (${issue.user.login}): ${status} -> ${next}`);
76
+ }
77
+ }
.github/workflows/pr-vouch.yml
+3
-3
@@ -101,17 +101,17 @@ jobs:
101
{
102
name: "vouch:trusted",
103
color: "1f883d",
104
- description: "PR author is trusted by repo permissions or the VOUCHED list.",
104
+ description: "Author is trusted by repo permissions or the VOUCHED list.",
105
},
106
{
107
name: "vouch:unvouched",
108
color: "fbca04",
109
- description: "PR author is not yet trusted in the VOUCHED list.",
109
+ description: "Author is not yet trusted in the VOUCHED list.",
110
},
111
{
112
name: "vouch:denounced",
113
color: "d1242f",
114
- description: "PR author is explicitly blocked by the VOUCHED list.",
114
+ description: "Author is explicitly blocked by the VOUCHED list.",
115
},
116
];
117