@reneturcios/greenlight 0.0.0-stage → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +213 -2
- package/dist/automate.d.ts +184 -0
- package/dist/automate.js +637 -0
- package/dist/automate.js.map +1 -0
- package/dist/claims.d.ts +20 -0
- package/dist/claims.js +112 -0
- package/dist/claims.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +337 -0
- package/dist/cli.js.map +1 -0
- package/dist/friction-index.d.ts +1 -0
- package/dist/friction-index.js +152 -0
- package/dist/friction-index.js.map +1 -0
- package/dist/friction.d.ts +28 -0
- package/dist/friction.js +54 -0
- package/dist/friction.js.map +1 -0
- package/dist/gates.d.ts +51 -0
- package/dist/gates.js +198 -0
- package/dist/gates.js.map +1 -0
- package/dist/github.d.ts +155 -0
- package/dist/github.js +531 -0
- package/dist/github.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +173 -0
- package/dist/index.js.map +1 -0
- package/dist/linkstrength.d.ts +27 -0
- package/dist/linkstrength.js +25 -0
- package/dist/linkstrength.js.map +1 -0
- package/dist/types.d.ts +131 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/verdict.d.ts +64 -0
- package/dist/verdict.js +220 -0
- package/dist/verdict.js.map +1 -0
- package/package.json +39 -3
- package/server.json +28 -0
package/dist/github.js
ADDED
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub API client. Native fetch only, no extra dependencies.
|
|
3
|
+
* Optional GITHUB_TOKEN env var raises the rate limit from 60 to 5000 req/hr.
|
|
4
|
+
* Responses are cached under ~/.cache/greenlight (6h TTL for issues/repos,
|
|
5
|
+
* 1h for search) so repeated checks do not burn quota.
|
|
6
|
+
*/
|
|
7
|
+
import { homedir } from "node:os";
|
|
8
|
+
import { join } from "node:path";
|
|
9
|
+
import { mkdirSync, readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
10
|
+
import { classifyLinkStrength } from "./linkstrength.js";
|
|
11
|
+
const API = "https://api.github.com";
|
|
12
|
+
const RAW = "https://raw.githubusercontent.com";
|
|
13
|
+
const CACHE_DIR = join(homedir(), ".cache", "greenlight");
|
|
14
|
+
function ensureCache() {
|
|
15
|
+
try {
|
|
16
|
+
mkdirSync(CACHE_DIR, { recursive: true });
|
|
17
|
+
}
|
|
18
|
+
catch { /* ignore */ }
|
|
19
|
+
}
|
|
20
|
+
const TTL_MS = {
|
|
21
|
+
issue: 6 * 60 * 60 * 1000,
|
|
22
|
+
search: 60 * 60 * 1000,
|
|
23
|
+
contributing: 24 * 60 * 60 * 1000,
|
|
24
|
+
};
|
|
25
|
+
function cacheKey(kind, parts) {
|
|
26
|
+
return `${kind}-${parts.join("-").replace(/[^a-zA-Z0-9_.-]/g, "_")}.json`;
|
|
27
|
+
}
|
|
28
|
+
function cacheGet(kind, parts) {
|
|
29
|
+
ensureCache();
|
|
30
|
+
const file = join(CACHE_DIR, cacheKey(kind, parts));
|
|
31
|
+
if (!existsSync(file))
|
|
32
|
+
return undefined;
|
|
33
|
+
try {
|
|
34
|
+
const entry = JSON.parse(readFileSync(file, "utf8"));
|
|
35
|
+
if (Date.now() - entry.savedAt > TTL_MS[kind])
|
|
36
|
+
return undefined;
|
|
37
|
+
return entry.data;
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function cacheSet(kind, parts, data) {
|
|
44
|
+
ensureCache();
|
|
45
|
+
const file = join(CACHE_DIR, cacheKey(kind, parts));
|
|
46
|
+
try {
|
|
47
|
+
writeFileSync(file, JSON.stringify({ savedAt: Date.now(), data }), "utf8");
|
|
48
|
+
}
|
|
49
|
+
catch { /* cache is best-effort */ }
|
|
50
|
+
}
|
|
51
|
+
export class RateLimitError extends Error {
|
|
52
|
+
constructor(message) {
|
|
53
|
+
super(message);
|
|
54
|
+
this.name = "RateLimitError";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** Thrown by apiGet/apiPost for HTTP 404, so callers can treat "missing" as data. */
|
|
58
|
+
export class ApiNotFoundError extends Error {
|
|
59
|
+
constructor(path) {
|
|
60
|
+
super(`GitHub API 404 for ${path}`);
|
|
61
|
+
this.name = "ApiNotFoundError";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export function githubToken() {
|
|
65
|
+
return process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
|
|
66
|
+
}
|
|
67
|
+
export async function apiGet(path) {
|
|
68
|
+
const headers = {
|
|
69
|
+
"Accept": "application/vnd.github+json",
|
|
70
|
+
"User-Agent": "greenlight-cli",
|
|
71
|
+
"X-GitHub-Api-Version": "2022-11-28",
|
|
72
|
+
};
|
|
73
|
+
const token = githubToken();
|
|
74
|
+
if (token)
|
|
75
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
76
|
+
const res = await fetch(`${API}${path}`, { headers });
|
|
77
|
+
if (res.status === 403 || res.status === 429) {
|
|
78
|
+
const body = await res.text().catch(() => "");
|
|
79
|
+
const reset = res.headers.get("x-ratelimit-reset");
|
|
80
|
+
const wait = reset ? ` Rate limit resets at ${new Date(Number(reset) * 1000).toISOString()}.` : "";
|
|
81
|
+
const hint = token
|
|
82
|
+
? "Authenticated limit also exhausted."
|
|
83
|
+
: "Set GITHUB_TOKEN (a classic PAT, no scopes needed for public repos) to raise the limit from 60 to 5000 req/hr.";
|
|
84
|
+
throw new RateLimitError(`GitHub rate limit hit (${res.status}).${wait} ${hint} ${body.slice(0, 120)}`);
|
|
85
|
+
}
|
|
86
|
+
if (res.status === 404) {
|
|
87
|
+
throw new ApiNotFoundError(path);
|
|
88
|
+
}
|
|
89
|
+
if (!res.ok) {
|
|
90
|
+
throw new Error(`GitHub API ${res.status} for ${path}: ${(await res.text()).slice(0, 200)}`);
|
|
91
|
+
}
|
|
92
|
+
return res.json();
|
|
93
|
+
}
|
|
94
|
+
/** POST helper for write operations (automation commands). Read paths use apiGet. */
|
|
95
|
+
export async function apiPost(path, body) {
|
|
96
|
+
const headers = {
|
|
97
|
+
"Accept": "application/vnd.github+json",
|
|
98
|
+
"Content-Type": "application/json",
|
|
99
|
+
"User-Agent": "greenlight-cli",
|
|
100
|
+
"X-GitHub-Api-Version": "2022-11-28",
|
|
101
|
+
};
|
|
102
|
+
const token = githubToken();
|
|
103
|
+
if (token)
|
|
104
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
105
|
+
const res = await fetch(`${API}${path}`, { method: "POST", headers, body: JSON.stringify(body) });
|
|
106
|
+
if (res.status === 403 || res.status === 429) {
|
|
107
|
+
const reset = res.headers.get("x-ratelimit-reset");
|
|
108
|
+
const wait = reset ? ` Rate limit resets at ${new Date(Number(reset) * 1000).toISOString()}.` : "";
|
|
109
|
+
throw new RateLimitError(`GitHub rate limit hit (${res.status}).${wait}`);
|
|
110
|
+
}
|
|
111
|
+
if (res.status === 404) {
|
|
112
|
+
throw new ApiNotFoundError(path);
|
|
113
|
+
}
|
|
114
|
+
if (!res.ok) {
|
|
115
|
+
throw new Error(`GitHub API ${res.status} for ${path}: ${(await res.text()).slice(0, 200)}`);
|
|
116
|
+
}
|
|
117
|
+
return res.json();
|
|
118
|
+
}
|
|
119
|
+
async function paginate(path, perPage = 100, maxPages = 5) {
|
|
120
|
+
const out = [];
|
|
121
|
+
for (let page = 1; page <= maxPages; page++) {
|
|
122
|
+
const sep = path.includes("?") ? "&" : "?";
|
|
123
|
+
const data = (await apiGet(`${path}${sep}per_page=${perPage}&page=${page}`));
|
|
124
|
+
out.push(...data);
|
|
125
|
+
if (data.length < perPage)
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
return out;
|
|
129
|
+
}
|
|
130
|
+
export function parseIssueUrl(url) {
|
|
131
|
+
const m = /github\.com\/([^/]+)\/([^/]+)\/(?:issues|pull)\/(\d+)/.exec(url);
|
|
132
|
+
if (!m)
|
|
133
|
+
throw new Error(`Not a GitHub issue URL: ${url}`);
|
|
134
|
+
return { owner: m[1], repo: m[2], number: Number(m[3]) };
|
|
135
|
+
}
|
|
136
|
+
/** Fetch issue comments for claim detection. */
|
|
137
|
+
export async function fetchComments(owner, repo, number) {
|
|
138
|
+
const cached = cacheGet("issue", [owner, repo, String(number), "comments"]);
|
|
139
|
+
if (cached)
|
|
140
|
+
return cached;
|
|
141
|
+
const data = await paginate(`/repos/${owner}/${repo}/issues/${number}/comments`);
|
|
142
|
+
const comments = data.map((c) => ({
|
|
143
|
+
author: c.user.login,
|
|
144
|
+
body: String(c.body ?? ""),
|
|
145
|
+
createdAt: String(c.created_at),
|
|
146
|
+
}));
|
|
147
|
+
cacheSet("issue", [owner, repo, String(number), "comments"], comments);
|
|
148
|
+
return comments;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Find PRs that reference an issue. Timeline cross-references and a text
|
|
152
|
+
* search for the issue number are discovery only: every candidate PR is
|
|
153
|
+
* then fetched individually and scored with classifyLinkStrength, so a PR
|
|
154
|
+
* that merely lists a sibling issue (e.g. pdfcn #91 closing #70 while
|
|
155
|
+
* mentioning #61) is stored as a "mention", not a "closing" PR. See issue #1.
|
|
156
|
+
*/
|
|
157
|
+
export async function fetchLinkedPRs(owner, repo, number) {
|
|
158
|
+
const cached = cacheGet("issue", [owner, repo, String(number), "prs"]);
|
|
159
|
+
if (cached)
|
|
160
|
+
return cached;
|
|
161
|
+
const found = new Map();
|
|
162
|
+
try {
|
|
163
|
+
const timeline = await paginate(`/repos/${owner}/${repo}/issues/${number}/timeline`);
|
|
164
|
+
for (const event of timeline) {
|
|
165
|
+
if (event.event !== "cross-referenced")
|
|
166
|
+
continue;
|
|
167
|
+
const src = event.source;
|
|
168
|
+
if (!src || src.type !== "issue")
|
|
169
|
+
continue;
|
|
170
|
+
const pull = src.pull_request;
|
|
171
|
+
if (!pull)
|
|
172
|
+
continue;
|
|
173
|
+
const prUrl = String(src.html_url ?? "");
|
|
174
|
+
const nm = /\/pull\/(\d+)/.exec(prUrl);
|
|
175
|
+
if (!nm)
|
|
176
|
+
continue;
|
|
177
|
+
found.set(Number(nm[1]), {
|
|
178
|
+
number: Number(nm[1]),
|
|
179
|
+
state: "open", // refined below via search state
|
|
180
|
+
title: String(src.title ?? ""),
|
|
181
|
+
url: prUrl,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
catch { /* timeline is best-effort */ }
|
|
186
|
+
// Search PRs in the repo that mention the issue number, to get states.
|
|
187
|
+
try {
|
|
188
|
+
const q = encodeURIComponent(`repo:${owner}/${repo} type:pr #${number}`);
|
|
189
|
+
const data = (await apiGet(`/search/issues?q=${q}&per_page=20`));
|
|
190
|
+
for (const item of data.items ?? []) {
|
|
191
|
+
const state = item.pull_request?.merged_at ? "merged" : item.state === "open" ? "open" : "closed";
|
|
192
|
+
found.set(item.number, {
|
|
193
|
+
number: item.number,
|
|
194
|
+
state,
|
|
195
|
+
title: item.title,
|
|
196
|
+
url: item.html_url,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
catch { /* search is best-effort */ }
|
|
201
|
+
// Score each candidate with its real body and branch: discovery is not evidence.
|
|
202
|
+
const prs = [];
|
|
203
|
+
for (const cand of found.values()) {
|
|
204
|
+
let linkStrength = "mention";
|
|
205
|
+
let title = cand.title;
|
|
206
|
+
try {
|
|
207
|
+
const detail = (await apiGet(`/repos/${owner}/${repo}/pulls/${cand.number}`));
|
|
208
|
+
title = String(detail.title ?? cand.title);
|
|
209
|
+
const branch = String(detail.head?.ref ?? "");
|
|
210
|
+
linkStrength = classifyLinkStrength({
|
|
211
|
+
title,
|
|
212
|
+
body: String(detail.body ?? ""),
|
|
213
|
+
branch,
|
|
214
|
+
issueNumber: number,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
catch {
|
|
218
|
+
linkStrength = "mention"; // could not read the PR; treat as a weak reference
|
|
219
|
+
}
|
|
220
|
+
prs.push({ number: cand.number, state: cand.state, title, url: cand.url, linkStrength });
|
|
221
|
+
}
|
|
222
|
+
cacheSet("issue", [owner, repo, String(number), "prs"], prs);
|
|
223
|
+
return prs;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Policy files fetched for gate extraction. Binding contribution rules
|
|
227
|
+
* increasingly live in house-rules files that CONTRIBUTING only links to
|
|
228
|
+
* (reticle keeps its claim-first, DCO, .changes and `pnpm verify` rules in
|
|
229
|
+
* AGENTS.md), so CONTRIBUTING variants are fetched together with AGENTS.md
|
|
230
|
+
* and CLAUDE.md at the root and under .github/. fastmcp moved its rules
|
|
231
|
+
* again in 2026, into docs/development/contributing.mdx behind a pointer
|
|
232
|
+
* CONTRIBUTING.md, which is why the development-guide paths are here too.
|
|
233
|
+
*/
|
|
234
|
+
export const HOUSE_RULE_FILES = [
|
|
235
|
+
"CONTRIBUTING.md",
|
|
236
|
+
"contributing.md",
|
|
237
|
+
".github/CONTRIBUTING.md",
|
|
238
|
+
"docs/development/contributing.mdx",
|
|
239
|
+
"docs/development/contributing.md",
|
|
240
|
+
"AGENTS.md",
|
|
241
|
+
"CLAUDE.md",
|
|
242
|
+
".github/AGENTS.md",
|
|
243
|
+
".github/CLAUDE.md",
|
|
244
|
+
];
|
|
245
|
+
/** Fetch all existing house-rules files for a repo (best-effort, cached). */
|
|
246
|
+
export async function fetchHouseRules(owner, repo, deps = {}) {
|
|
247
|
+
if (!deps.fetchRaw) {
|
|
248
|
+
const cached = cacheGet("house-rules", [owner, repo]);
|
|
249
|
+
if (cached)
|
|
250
|
+
return cached;
|
|
251
|
+
}
|
|
252
|
+
const headers = { "User-Agent": "greenlight-cli" };
|
|
253
|
+
const token = githubToken();
|
|
254
|
+
if (token)
|
|
255
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
256
|
+
const fetchRaw = deps.fetchRaw ??
|
|
257
|
+
(async (file) => {
|
|
258
|
+
try {
|
|
259
|
+
const res = await fetch(`${RAW}/${owner}/${repo}/HEAD/${file}`, { headers });
|
|
260
|
+
if (res.ok)
|
|
261
|
+
return await res.text();
|
|
262
|
+
}
|
|
263
|
+
catch { /* try next */ }
|
|
264
|
+
return undefined;
|
|
265
|
+
});
|
|
266
|
+
const out = [];
|
|
267
|
+
for (const file of HOUSE_RULE_FILES) {
|
|
268
|
+
const text = await fetchRaw(file);
|
|
269
|
+
if (text)
|
|
270
|
+
out.push({ file, text });
|
|
271
|
+
}
|
|
272
|
+
if (!deps.fetchRaw)
|
|
273
|
+
cacheSet("house-rules", [owner, repo], out);
|
|
274
|
+
return out;
|
|
275
|
+
}
|
|
276
|
+
/** Fetch CONTRIBUTING.md raw text; returns undefined when the repo has none. */
|
|
277
|
+
export async function fetchContributing(owner, repo) {
|
|
278
|
+
const rules = await fetchHouseRules(owner, repo);
|
|
279
|
+
return rules.find((r) => r.file.toLowerCase().includes("contributing"))?.text;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Extract PR references from comment bodies: bare #NNN mentions and full
|
|
283
|
+
* github.com/<owner>/<repo>/pull/NNN URLs. Returns deduplicated numbers in
|
|
284
|
+
* order of first appearance.
|
|
285
|
+
*/
|
|
286
|
+
export function extractPRReferences(comments, owner, repo) {
|
|
287
|
+
const esc = (s) => s.replace(/[^a-zA-Z0-9_.-]/g, "");
|
|
288
|
+
const urlRe = new RegExp(`github\\.com/${esc(owner)}/${esc(repo)}/pull/(\\d+)`, "gi");
|
|
289
|
+
const bareRe = /#(\d{1,6})\b/g;
|
|
290
|
+
const seen = new Set();
|
|
291
|
+
const out = [];
|
|
292
|
+
for (const comment of comments) {
|
|
293
|
+
for (const re of [urlRe, bareRe]) {
|
|
294
|
+
re.lastIndex = 0;
|
|
295
|
+
let m;
|
|
296
|
+
while ((m = re.exec(comment.body)) !== null) {
|
|
297
|
+
const n = Number(m[1]);
|
|
298
|
+
if (n > 0 && !seen.has(n)) {
|
|
299
|
+
seen.add(n);
|
|
300
|
+
out.push(n);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return out;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* PR references per citing comment author: number -> first comment author
|
|
309
|
+
* that cited it. Used to tag MentionedPRs with fromAuthor.
|
|
310
|
+
*/
|
|
311
|
+
export function extractPRReferenceAuthors(comments, owner, repo) {
|
|
312
|
+
const esc = (s) => s.replace(/[^a-zA-Z0-9_.-]/g, "");
|
|
313
|
+
const urlRe = new RegExp(`github\\.com/${esc(owner)}/${esc(repo)}/pull/(\\d+)`, "gi");
|
|
314
|
+
const bareRe = /#(\d{1,6})\b/g;
|
|
315
|
+
const out = new Map();
|
|
316
|
+
for (const comment of comments) {
|
|
317
|
+
for (const re of [urlRe, bareRe]) {
|
|
318
|
+
re.lastIndex = 0;
|
|
319
|
+
let m;
|
|
320
|
+
while ((m = re.exec(comment.body)) !== null) {
|
|
321
|
+
const n = Number(m[1]);
|
|
322
|
+
if (n > 0 && !out.has(n))
|
|
323
|
+
out.set(n, comment.author);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return out;
|
|
328
|
+
}
|
|
329
|
+
/** True when text references issue number n via #n or a full issue/PR URL. */
|
|
330
|
+
function mentionsIssueNumber(text, n) {
|
|
331
|
+
const bare = text.match(/#(\d{1,6})\b/g) ?? [];
|
|
332
|
+
if (bare.some((r) => Number(r.slice(1)) === n))
|
|
333
|
+
return true;
|
|
334
|
+
return text.includes(`/issues/${n}`) || text.includes(`/pull/${n}`);
|
|
335
|
+
}
|
|
336
|
+
async function defaultFetchPull(owner, repo, n) {
|
|
337
|
+
try {
|
|
338
|
+
const d = (await apiGet(`/repos/${owner}/${repo}/pulls/${n}`));
|
|
339
|
+
return {
|
|
340
|
+
number: Number(d.number ?? n),
|
|
341
|
+
state: d.state === "closed" ? "closed" : "open",
|
|
342
|
+
merged: d.merged_at != null,
|
|
343
|
+
title: String(d.title ?? ""),
|
|
344
|
+
body: String(d.body ?? ""),
|
|
345
|
+
url: String(d.html_url ?? ""),
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
catch (e) {
|
|
349
|
+
// A 404 here means the reference was an issue number, not a PR: skip it.
|
|
350
|
+
if (e instanceof ApiNotFoundError)
|
|
351
|
+
return null;
|
|
352
|
+
throw e;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Cross-check PR references found in comments against the PR API.
|
|
357
|
+
*
|
|
358
|
+
* Motivation: reticlehq/reticle#691 got a clean GO verdict while its comments
|
|
359
|
+
* contained a partial claim ("Taking the remaining fallback ask") and a
|
|
360
|
+
* heads-up that PR #861 covers that work. Neither signal existed in the
|
|
361
|
+
* timeline or the issue-number search, so both were missed.
|
|
362
|
+
*
|
|
363
|
+
* All comments are scanned (PR references are cheap to extract), but each
|
|
364
|
+
* result records whether the citing comment came from the issue author.
|
|
365
|
+
* The open-PR downgrade (rule 11) only trusts non-author heads-ups; the
|
|
366
|
+
* partially-addressed rule (rule 12) also reads the author's, because the
|
|
367
|
+
* maintainer narrating what already shipped is usually the issue author.
|
|
368
|
+
* References already found via the timeline/search, and the issue's own
|
|
369
|
+
* number, are skipped. Bounded at 5 PR fetches per call; the walk is
|
|
370
|
+
* best-effort and cached like the rest of the issue data.
|
|
371
|
+
*/
|
|
372
|
+
export async function fetchCommentMentionedPRs(owner, repo, issueNumber, comments, knownPRNumbers, deps = {}) {
|
|
373
|
+
// Injected fetch deps (tests) bypass the cache; live calls use it.
|
|
374
|
+
const useCache = !deps.fetchPull;
|
|
375
|
+
if (useCache) {
|
|
376
|
+
const cached = cacheGet("issue", [owner, repo, String(issueNumber), "mentioned-prs"]);
|
|
377
|
+
if (cached)
|
|
378
|
+
return cached;
|
|
379
|
+
}
|
|
380
|
+
const refs = extractPRReferences(comments, owner, repo)
|
|
381
|
+
.filter((n) => n !== issueNumber && !knownPRNumbers.includes(n))
|
|
382
|
+
.slice(0, 5);
|
|
383
|
+
const fetchPull = deps.fetchPull ?? defaultFetchPull;
|
|
384
|
+
const refAuthors = extractPRReferenceAuthors(comments, owner, repo);
|
|
385
|
+
const out = [];
|
|
386
|
+
for (const n of refs) {
|
|
387
|
+
let detail;
|
|
388
|
+
try {
|
|
389
|
+
detail = await fetchPull(owner, repo, n);
|
|
390
|
+
}
|
|
391
|
+
catch {
|
|
392
|
+
break; // best-effort: a failing provider ends the walk, keeps prior results
|
|
393
|
+
}
|
|
394
|
+
if (!detail)
|
|
395
|
+
continue; // it was an issue number, not a PR
|
|
396
|
+
out.push({
|
|
397
|
+
number: detail.number,
|
|
398
|
+
url: detail.url,
|
|
399
|
+
state: detail.merged ? "merged" : detail.state,
|
|
400
|
+
mentionsIssue: mentionsIssueNumber(`${detail.title}\n${detail.body}`, issueNumber),
|
|
401
|
+
...(deps.issueAuthor && refAuthors.get(detail.number) === deps.issueAuthor
|
|
402
|
+
? { fromAuthor: true }
|
|
403
|
+
: {}),
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
if (useCache)
|
|
407
|
+
cacheSet("issue", [owner, repo, String(issueNumber), "mentioned-prs"], out);
|
|
408
|
+
return out;
|
|
409
|
+
}
|
|
410
|
+
/** Count open issues labelled good-first-issue or help-wanted. */
|
|
411
|
+
export async function countStarterIssues(owner, repo) {
|
|
412
|
+
try {
|
|
413
|
+
const q = encodeURIComponent(`repo:${owner}/${repo} type:issue state:open (label:"good first issue" OR label:"help wanted")`);
|
|
414
|
+
const data = (await apiGet(`/search/issues?q=${q}&per_page=1`));
|
|
415
|
+
return data.total_count ?? null;
|
|
416
|
+
}
|
|
417
|
+
catch {
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
/** Detect a collaborators-only PR creation policy via the community metrics endpoint. */
|
|
422
|
+
export async function detectRepoPolicy(owner, repo) {
|
|
423
|
+
// Best-effort: no public API exposes pull_request_creation_policy directly,
|
|
424
|
+
// so we treat it as unknown (false) unless evidence appears elsewhere.
|
|
425
|
+
return { collaboratorsOnly: false };
|
|
426
|
+
}
|
|
427
|
+
/** Build a full IssueSnapshot from the live API. */
|
|
428
|
+
export async function buildIssueSnapshot(owner, repo, number) {
|
|
429
|
+
const cached = cacheGet("issue", [owner, repo, String(number), "snapshot"]);
|
|
430
|
+
if (cached)
|
|
431
|
+
return cached;
|
|
432
|
+
const issue = (await apiGet(`/repos/${owner}/${repo}/issues/${number}`));
|
|
433
|
+
if (issue.pull_request) {
|
|
434
|
+
throw new Error(`#${number} is a pull request, not an issue`);
|
|
435
|
+
}
|
|
436
|
+
const [comments, linkedPRs, houseRules] = await Promise.all([
|
|
437
|
+
fetchComments(owner, repo, number),
|
|
438
|
+
fetchLinkedPRs(owner, repo, number),
|
|
439
|
+
fetchHouseRules(owner, repo),
|
|
440
|
+
]);
|
|
441
|
+
// Comment-mentioned PRs: references like "#861" in comments, cross-checked
|
|
442
|
+
// against the PR API. The open-PR downgrade trusts only non-author
|
|
443
|
+
// heads-ups (see rule 11), but the partially-addressed rule also reads
|
|
444
|
+
// the author's, since the maintainer narrating shipped work is usually
|
|
445
|
+
// the issue author. Best-effort; never blocks the snapshot.
|
|
446
|
+
let commentMentionedPRs = [];
|
|
447
|
+
try {
|
|
448
|
+
const issueAuthor = String(issue.user?.login ?? "");
|
|
449
|
+
commentMentionedPRs = await fetchCommentMentionedPRs(owner, repo, number, comments, linkedPRs.map((p) => p.number), { issueAuthor });
|
|
450
|
+
}
|
|
451
|
+
catch { /* best-effort */ }
|
|
452
|
+
const snapshot = {
|
|
453
|
+
sourceUrl: `https://github.com/${owner}/${repo}/issues/${number}`,
|
|
454
|
+
owner,
|
|
455
|
+
repo,
|
|
456
|
+
number,
|
|
457
|
+
state: String(issue.state),
|
|
458
|
+
title: String(issue.title ?? ""),
|
|
459
|
+
body: String(issue.body ?? ""),
|
|
460
|
+
author: (issue.user?.login ?? ""),
|
|
461
|
+
assignees: (issue.assignees ?? []).map((a) => a.login),
|
|
462
|
+
labels: (issue.labels ?? []).map((l) => l.name),
|
|
463
|
+
comments,
|
|
464
|
+
linkedPRs,
|
|
465
|
+
commentMentionedPRs,
|
|
466
|
+
createdAt: String(issue.created_at),
|
|
467
|
+
updatedAt: String(issue.updated_at),
|
|
468
|
+
// Joined text kept for compatibility; the verdict engine prefers the
|
|
469
|
+
// per-file houseRules when present so gates record their source file.
|
|
470
|
+
contributing: houseRules.map((r) => r.text).join("\n\n"),
|
|
471
|
+
houseRules,
|
|
472
|
+
};
|
|
473
|
+
cacheSet("issue", [owner, repo, String(number), "snapshot"], snapshot);
|
|
474
|
+
return snapshot;
|
|
475
|
+
}
|
|
476
|
+
/** List open good-first-issue / help-wanted issues for scan mode. */
|
|
477
|
+
export async function listStarterIssues(owner, repo, limit = 25) {
|
|
478
|
+
const q = encodeURIComponent(`repo:${owner}/${repo} type:issue state:open no:assignee (label:"good first issue" OR label:"help wanted")`);
|
|
479
|
+
const data = (await apiGet(`/search/issues?q=${q}&per_page=${limit}&sort=updated&order=desc`));
|
|
480
|
+
return (data.items ?? []).map((i) => ({
|
|
481
|
+
number: i.number,
|
|
482
|
+
title: i.title,
|
|
483
|
+
url: i.html_url,
|
|
484
|
+
labels: i.labels.map((l) => l.name),
|
|
485
|
+
updatedAt: i.updated_at,
|
|
486
|
+
}));
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Filter raw issue-list items down to scan candidates: real issues (not
|
|
490
|
+
* pull requests) with no assignees, newest first. Pure so tests can drive
|
|
491
|
+
* it with fixtures.
|
|
492
|
+
*/
|
|
493
|
+
export function toScanCandidates(items) {
|
|
494
|
+
return items
|
|
495
|
+
.filter((i) => !i.pull_request && (i.assignees ?? []).length === 0)
|
|
496
|
+
.map((i) => ({
|
|
497
|
+
number: i.number,
|
|
498
|
+
title: i.title,
|
|
499
|
+
url: i.html_url,
|
|
500
|
+
labels: i.labels.map((l) => l.name),
|
|
501
|
+
updatedAt: i.updated_at,
|
|
502
|
+
}));
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Fallback candidate list for scan mode: the most recent open unassigned
|
|
506
|
+
* issues in the repo, for repos whose landable issues do not carry
|
|
507
|
+
* good-first-issue / help-wanted labels. Lists broadly (up to `cap`) so
|
|
508
|
+
* the caller can take the newest slice.
|
|
509
|
+
*/
|
|
510
|
+
export async function listRecentUnassignedIssues(owner, repo, cap = 25) {
|
|
511
|
+
const items = await paginate(`/repos/${owner}/${repo}/issues?state=open&sort=created&direction=desc`, 100, 3);
|
|
512
|
+
return toScanCandidates(items).slice(0, cap);
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Scan candidates for a repo: the label-tagged starter list first; when it
|
|
516
|
+
* is empty, fall back to recent open unassigned issues (opt out with
|
|
517
|
+
* fallback: false). Injectable deps keep tests offline.
|
|
518
|
+
*/
|
|
519
|
+
export async function scanCandidates(owner, repo, opts = {}, deps = {}) {
|
|
520
|
+
const limit = opts.limit ?? 10;
|
|
521
|
+
const starter = deps.starter ?? listStarterIssues;
|
|
522
|
+
const labeled = await starter(owner, repo, limit);
|
|
523
|
+
if (labeled.length > 0)
|
|
524
|
+
return { issues: labeled, fallbackUsed: false };
|
|
525
|
+
if (opts.fallback === false)
|
|
526
|
+
return { issues: [], fallbackUsed: false };
|
|
527
|
+
const recent = deps.recent ?? listRecentUnassignedIssues;
|
|
528
|
+
const issues = (await recent(owner, repo, 25)).slice(0, limit);
|
|
529
|
+
return { issues, fallbackUsed: true };
|
|
530
|
+
}
|
|
531
|
+
//# sourceMappingURL=github.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CA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