@codetelemetry/mcp 0.3.8 → 0.3.9
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/README.md +11 -2
- package/dist/src/client/agent.d.ts +20 -0
- package/dist/src/client/agent.js +20 -0
- package/dist/src/client/config.d.ts +2 -0
- package/dist/src/client/config.js +2 -0
- package/dist/src/tools.js +109 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/tool-manifest.json +70 -3
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ deterministic (see [Releases & discovery](#releases--discovery)):
|
|
|
31
31
|
```json
|
|
32
32
|
{
|
|
33
33
|
"mcpServers": {
|
|
34
|
-
"codetelemetry": { "command": "npx", "args": ["-y", "--package=@codetelemetry/mcp@0.3.
|
|
34
|
+
"codetelemetry": { "command": "npx", "args": ["-y", "--package=@codetelemetry/mcp@0.3.9", "codetelemetry-mcp"] }
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
```
|
|
@@ -61,10 +61,19 @@ Then just ask the agent: **"Connect me to CodeTelemetry."**
|
|
|
61
61
|
| `estimate_task_size` | T-shirt size a proposed task (free-form text or a Linear-shaped issue) from the caller's own history. |
|
|
62
62
|
| `estimate_plan` | T-shirt size a Claude Code / Codex **plan** (plain text or ordered steps) from the caller's own history. |
|
|
63
63
|
| `estimate_linear_issue` | T-shirt size an **existing Linear issue** by URL or identifier, resolved through the workspace the user already connected. |
|
|
64
|
+
| `get_github_pr_gate` | Read the workspace's GitHub PR gate as its settings page shows it: the policy, trusted repositories, the GitHub Actions workflow file to commit, the check to require, outstanding steps, and recent decisions. |
|
|
65
|
+
| `configure_github_pr_gate` | Set up or change the GitHub PR gate: trust repositories (`owner/repo` or `owner/*`), set the policy, enable it. Once the gate is on, a change that loosens it is refused (`requires_dashboard`) and the user makes it on the settings page. No GitHub token is involved: the workflow authenticates with GitHub's own OIDC token. |
|
|
64
66
|
|
|
65
67
|
Typical agent flow: `authenticate` → (human approves) → `auth_status` →
|
|
66
68
|
`onboard`. Or, if the user pastes a key: `onboard { key }`.
|
|
67
69
|
|
|
70
|
+
GitHub PR gate flow, run from inside the repository to gate:
|
|
71
|
+
`configure_github_pr_gate { addRepositories: ["owner/repo"], enabled: true }` →
|
|
72
|
+
commit `gate.actions.workflow.content` at `gate.actions.workflow.path` (a PR
|
|
73
|
+
the user merges) → once it has run, the user requires
|
|
74
|
+
`codetelemetry/validation` from GitHub Actions on the default branch (`howTo`
|
|
75
|
+
gives the `gh api` ruleset command to run with their permission).
|
|
76
|
+
|
|
68
77
|
## Organizations
|
|
69
78
|
|
|
70
79
|
Without an `organizationId`, the key goes wherever the user picks while approving:
|
|
@@ -288,7 +297,7 @@ npm run smoke -- --tarball out.tgz --require-auth # exactly these by
|
|
|
288
297
|
and read `server`:
|
|
289
298
|
|
|
290
299
|
```jsonc
|
|
291
|
-
"server": { "name": "codetelemetry", "version": "0.3.
|
|
300
|
+
"server": { "name": "codetelemetry", "version": "0.3.9", "registryHash": "cb420922…", "toolCount": 21 }
|
|
292
301
|
```
|
|
293
302
|
|
|
294
303
|
**When a long-running client sees a new tool.** `tools/list` is requested once, at
|
|
@@ -445,6 +445,26 @@ export declare function readSessionEvents(opts: {
|
|
|
445
445
|
error: string | null;
|
|
446
446
|
message: string | null;
|
|
447
447
|
}>;
|
|
448
|
+
export type GitHubGateResult = {
|
|
449
|
+
ok: boolean;
|
|
450
|
+
gate: Record<string, unknown> | null;
|
|
451
|
+
httpStatus: number;
|
|
452
|
+
error: string | null;
|
|
453
|
+
message: string | null;
|
|
454
|
+
};
|
|
455
|
+
export declare function readGitHubGate(opts: {
|
|
456
|
+
key: string;
|
|
457
|
+
url: string;
|
|
458
|
+
fetchImpl?: FetchLike;
|
|
459
|
+
timeoutMs?: number;
|
|
460
|
+
}): Promise<GitHubGateResult>;
|
|
461
|
+
export declare function configureGitHubGate(opts: {
|
|
462
|
+
key: string;
|
|
463
|
+
url: string;
|
|
464
|
+
change: Record<string, unknown>;
|
|
465
|
+
fetchImpl?: FetchLike;
|
|
466
|
+
timeoutMs?: number;
|
|
467
|
+
}): Promise<GitHubGateResult>;
|
|
448
468
|
export declare function compareSessions(opts: {
|
|
449
469
|
key: string;
|
|
450
470
|
url: string;
|
package/dist/src/client/agent.js
CHANGED
|
@@ -231,6 +231,26 @@ export async function readSessionEvents(opts) {
|
|
|
231
231
|
message: result.message,
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
+
export async function readGitHubGate(opts) {
|
|
235
|
+
const result = await postAgent({ ...opts, body: {} });
|
|
236
|
+
return {
|
|
237
|
+
ok: result.ok,
|
|
238
|
+
gate: result.ok ? result.value?.gate ?? null : null,
|
|
239
|
+
httpStatus: result.httpStatus,
|
|
240
|
+
error: result.error,
|
|
241
|
+
message: result.message,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
export async function configureGitHubGate(opts) {
|
|
245
|
+
const result = await postAgent({ ...opts, body: opts.change });
|
|
246
|
+
return {
|
|
247
|
+
ok: result.ok,
|
|
248
|
+
gate: result.ok ? result.value?.gate ?? null : null,
|
|
249
|
+
httpStatus: result.httpStatus,
|
|
250
|
+
error: result.error,
|
|
251
|
+
message: result.message,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
234
254
|
export async function compareSessions(opts) {
|
|
235
255
|
const result = await postAgent({
|
|
236
256
|
...opts,
|
|
@@ -21,6 +21,8 @@ export type Endpoints = {
|
|
|
21
21
|
agentReadSessionEventsUrl: string;
|
|
22
22
|
agentCompareSessionsUrl: string;
|
|
23
23
|
agentPlanNextSessionUrl: string;
|
|
24
|
+
agentGitHubGateUrl: string;
|
|
25
|
+
agentGitHubGateConfigureUrl: string;
|
|
24
26
|
};
|
|
25
27
|
export declare function resolveEndpoints(overrides?: Partial<{
|
|
26
28
|
apiBase: string;
|
|
@@ -28,6 +28,8 @@ export function resolveEndpoints(overrides = {}) {
|
|
|
28
28
|
agentReadSessionEventsUrl: `${apiBase}/api/agent/read-session-events`,
|
|
29
29
|
agentCompareSessionsUrl: `${apiBase}/api/agent/compare-sessions`,
|
|
30
30
|
agentPlanNextSessionUrl: `${apiBase}/api/agent/plan-next-session`,
|
|
31
|
+
agentGitHubGateUrl: `${apiBase}/api/agent/github-gate`,
|
|
32
|
+
agentGitHubGateConfigureUrl: `${apiBase}/api/agent/github-gate/configure`,
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
35
|
export function resolveSettingsPath(opts = {}) {
|
package/dist/src/tools.js
CHANGED
|
@@ -6,7 +6,7 @@ import { writeSettings, readSettingsSummary, } from "./client/settings.js";
|
|
|
6
6
|
import { resolveCodexConfigPath, writeCodexConfig, readCodexSummary, } from "./client/codexConfig.js";
|
|
7
7
|
import { sendTestEvent, } from "./client/otlp.js";
|
|
8
8
|
import { confirmLanded, verifyScope, } from "./client/connectivity.js";
|
|
9
|
-
import { getCostSignal, getSessionPerformance, findSimilarSessionErrors, searchCodingSessions, SESSION_SEARCH_REQUEST_TIMEOUT_MS, estimateTaskSize, estimateLinearIssue, interpretSession, readSessionEvents, compareSessions, planNextSession, } from "./client/agent.js";
|
|
9
|
+
import { getCostSignal, getSessionPerformance, findSimilarSessionErrors, searchCodingSessions, SESSION_SEARCH_REQUEST_TIMEOUT_MS, estimateTaskSize, estimateLinearIssue, interpretSession, readSessionEvents, compareSessions, planNextSession, readGitHubGate, configureGitHubGate, } from "./client/agent.js";
|
|
10
10
|
import { normalizePlan, PLAN_PROVIDERS, MAX_PLAN_TEXT, MAX_PLAN_STEPS, } from "./client/plan.js";
|
|
11
11
|
import { requestDeviceCode, pollOnce, } from "./client/deviceClient.js";
|
|
12
12
|
import { onboard as onboardCore, } from "./client/onboard.js";
|
|
@@ -338,6 +338,22 @@ function boundedCompareSessionsResult(value) {
|
|
|
338
338
|
message: "The comparison response exceeded the complete MCP response budget; retry with fewer sessions.",
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
+
const GITHUB_GATE_SETTINGS_PATH = "/app/integrations/github";
|
|
342
|
+
const GITHUB_GATE_HOW_TO = {
|
|
343
|
+
workflow: "Commit gate.actions.workflow.content, unchanged, at gate.actions.workflow.path on the default branch of each trusted repository (for example in a pull request the user merges). It runs on pull_request_target, so it takes effect once it is on the default branch.",
|
|
344
|
+
requireCheck: "After the workflow has run once, require the check gate.actions.requiredCheck.name from GitHub Actions on the default branch. With the user's permission and their own gh CLI: gh api -X POST repos/OWNER/REPO/rulesets --input - with gate.actions.rulesetJson as the body. Or Settings > Rules > Rulesets (or Branches) > Require status checks to pass.",
|
|
345
|
+
noSecrets: "Never ask the user for a GitHub token: the workflow authenticates with GitHub's OIDC token and needs only permissions: id-token: write.",
|
|
346
|
+
};
|
|
347
|
+
const GITHUB_GATE_ERRORS = new Set(["invalid", "not_ready", "requires_dashboard", "not_configured", "conflict"]);
|
|
348
|
+
function githubGateFailure(r) {
|
|
349
|
+
if (r.httpStatus === 401)
|
|
350
|
+
return { ok: false, error: "unauthenticated", message: "ingest key invalid or revoked" };
|
|
351
|
+
if (r.httpStatus === 429)
|
|
352
|
+
return { ok: false, error: "rate_limited", message: "GitHub PR gate rate limit exceeded; retry shortly" };
|
|
353
|
+
if (r.error && GITHUB_GATE_ERRORS.has(r.error))
|
|
354
|
+
return { ok: false, error: r.error, message: r.message ?? r.error };
|
|
355
|
+
return { ok: false, error: "github_gate_unavailable", message: r.message ?? r.error ?? `GitHub PR gate returned HTTP ${r.httpStatus}` };
|
|
356
|
+
}
|
|
341
357
|
export const TOOLS = [
|
|
342
358
|
{
|
|
343
359
|
name: "authenticate",
|
|
@@ -1305,6 +1321,98 @@ export const TOOLS = [
|
|
|
1305
1321
|
};
|
|
1306
1322
|
},
|
|
1307
1323
|
},
|
|
1324
|
+
{
|
|
1325
|
+
name: "get_github_pr_gate",
|
|
1326
|
+
title: "Read the GitHub PR gate",
|
|
1327
|
+
description: "Use this when the user wants to set up, check, or understand their CodeTelemetry GitHub PR gate: a required GitHub check that blocks a pull request whose coding session did not meet the workspace's validation policy. " +
|
|
1328
|
+
"Returns the gate exactly as its settings page shows it: the policy (enabled, minScore, missingScore, complexityAware, requireTestBeforePush), the trusted repositories, the GitHub Actions workflow file to commit (actions.workflow.path and its exact content), the check to require (actions.requiredCheck), nextSteps still outstanding, and recent decisions. " +
|
|
1329
|
+
"Setup needs no GitHub token or secret: the workflow authenticates to CodeTelemetry with the OIDC token GitHub mints for each run. Read-only.",
|
|
1330
|
+
inputSchema: obj(),
|
|
1331
|
+
async handler(_args, ctx) {
|
|
1332
|
+
if (!ctx.session.hasKey())
|
|
1333
|
+
return NO_KEY;
|
|
1334
|
+
const ep = endpointsFor(ctx);
|
|
1335
|
+
const r = await readGitHubGate({ key: ctx.session.useKey(), url: ep.agentGitHubGateUrl, fetchImpl: ctx.fetchImpl });
|
|
1336
|
+
if (!r.ok || !r.gate)
|
|
1337
|
+
return githubGateFailure(r);
|
|
1338
|
+
return { ok: true, gate: r.gate, settingsUrl: `${ep.apiBase}${GITHUB_GATE_SETTINGS_PATH}`, howTo: GITHUB_GATE_HOW_TO };
|
|
1339
|
+
},
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
name: "configure_github_pr_gate",
|
|
1343
|
+
title: "Configure the GitHub PR gate",
|
|
1344
|
+
description: "Use this when the user asks to set up or change their CodeTelemetry GitHub PR gate. Change only what they asked for. " +
|
|
1345
|
+
"addRepositories / removeRepositories take owner/repo, owner/* (every repository of that owner), or a github.com URL; the repository you are working in is usually the one to add. " +
|
|
1346
|
+
"Policy: minScore (0-100), missingScore (pass lets a PR with no session or no score through; fail blocks it), complexityAware (simple work needs a lower score), requireTestBeforePush, and enabled. Enabling needs at least one trusted repository. " +
|
|
1347
|
+
"Once the gate is enabled, a change that loosens it (turning it off, lowering minScore, missingScore fail to pass, turning complexityAware on, dropping requireTestBeforePush) is refused with requires_dashboard: the gate judges your own work, so the user makes that change on the settings page. " +
|
|
1348
|
+
"Returns the updated gate. GitHub enforces nothing until the workflow in gate.actions.workflow is committed to each trusted repository's default branch and the check in gate.actions.requiredCheck is required there; howTo says how.",
|
|
1349
|
+
inputSchema: obj({
|
|
1350
|
+
addRepositories: {
|
|
1351
|
+
type: "array",
|
|
1352
|
+
maxItems: 20,
|
|
1353
|
+
items: { type: "string", minLength: 3, maxLength: 300 },
|
|
1354
|
+
description: "Repositories to trust: owner/repo, owner/*, or a github.com repository URL.",
|
|
1355
|
+
},
|
|
1356
|
+
removeRepositories: {
|
|
1357
|
+
type: "array",
|
|
1358
|
+
maxItems: 20,
|
|
1359
|
+
items: { type: "string", minLength: 3, maxLength: 300 },
|
|
1360
|
+
description: "Repositories to stop trusting. Their checks are then refused, which blocks rather than passes.",
|
|
1361
|
+
},
|
|
1362
|
+
enabled: { type: "boolean", description: "Turn the gate on. Turning it off is a loosening: the user does that on the settings page." },
|
|
1363
|
+
minScore: { type: "integer", minimum: 0, maximum: 100, description: "The validation score a PR's session must reach (default 70)." },
|
|
1364
|
+
missingScore: { type: "string", enum: ["pass", "fail"], description: "What happens when no session or no score can be found for a PR (default pass)." },
|
|
1365
|
+
complexityAware: { type: "boolean", description: "Trivial work always passes and low-complexity work needs half the score." },
|
|
1366
|
+
requireTestBeforePush: { type: "boolean", description: "Every linked session must pass its required checks after its final edit and before pushing." },
|
|
1367
|
+
}),
|
|
1368
|
+
async handler(args, ctx) {
|
|
1369
|
+
if (!ctx.session.hasKey())
|
|
1370
|
+
return NO_KEY;
|
|
1371
|
+
const change = {};
|
|
1372
|
+
for (const name of ["addRepositories", "removeRepositories"]) {
|
|
1373
|
+
const value = args[name];
|
|
1374
|
+
if (value === undefined)
|
|
1375
|
+
continue;
|
|
1376
|
+
if (!Array.isArray(value) || value.length > 20 ||
|
|
1377
|
+
!value.every((item) => typeof item === "string" && item.trim().length >= 3 && item.length <= 300)) {
|
|
1378
|
+
return { ok: false, error: "bad_input", message: `${name} must be a list of at most 20 repositories (owner/repo or owner/*)` };
|
|
1379
|
+
}
|
|
1380
|
+
change[name] = value.map((item) => item.trim());
|
|
1381
|
+
}
|
|
1382
|
+
for (const name of ["enabled", "complexityAware", "requireTestBeforePush"]) {
|
|
1383
|
+
if (args[name] === undefined)
|
|
1384
|
+
continue;
|
|
1385
|
+
if (typeof args[name] !== "boolean")
|
|
1386
|
+
return { ok: false, error: "bad_input", message: `${name} must be a boolean` };
|
|
1387
|
+
change[name] = args[name];
|
|
1388
|
+
}
|
|
1389
|
+
if (args.minScore !== undefined) {
|
|
1390
|
+
const score = args.minScore;
|
|
1391
|
+
if (typeof score !== "number" || !Number.isInteger(score) || score < 0 || score > 100) {
|
|
1392
|
+
return { ok: false, error: "bad_input", message: "minScore must be an integer from 0 to 100" };
|
|
1393
|
+
}
|
|
1394
|
+
change.minScore = score;
|
|
1395
|
+
}
|
|
1396
|
+
if (args.missingScore !== undefined) {
|
|
1397
|
+
if (args.missingScore !== "pass" && args.missingScore !== "fail") {
|
|
1398
|
+
return { ok: false, error: "bad_input", message: "missingScore must be pass or fail" };
|
|
1399
|
+
}
|
|
1400
|
+
change.missingScore = args.missingScore;
|
|
1401
|
+
}
|
|
1402
|
+
if (Object.keys(change).length === 0) {
|
|
1403
|
+
return { ok: false, error: "bad_input", message: "Nothing to change: pass a repository list or a policy field." };
|
|
1404
|
+
}
|
|
1405
|
+
const ep = endpointsFor(ctx);
|
|
1406
|
+
const r = await configureGitHubGate({ key: ctx.session.useKey(), url: ep.agentGitHubGateConfigureUrl, change, fetchImpl: ctx.fetchImpl });
|
|
1407
|
+
if (!r.ok || !r.gate) {
|
|
1408
|
+
const failure = githubGateFailure(r);
|
|
1409
|
+
return r.error === "requires_dashboard"
|
|
1410
|
+
? { ...failure, settingsUrl: `${ep.apiBase}${GITHUB_GATE_SETTINGS_PATH}` }
|
|
1411
|
+
: failure;
|
|
1412
|
+
}
|
|
1413
|
+
return { ok: true, gate: r.gate, settingsUrl: `${ep.apiBase}${GITHUB_GATE_SETTINGS_PATH}`, howTo: GITHUB_GATE_HOW_TO };
|
|
1414
|
+
},
|
|
1415
|
+
},
|
|
1308
1416
|
];
|
|
1309
1417
|
export const TOOLS_BY_NAME = Object.fromEntries(TOOLS.map((t) => [t.name, t]));
|
|
1310
1418
|
export async function callTool(name, args, ctx) {
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const MCP_SERVER_NAME = "codetelemetry";
|
|
2
|
-
export declare const MCP_SERVER_VERSION = "0.3.
|
|
2
|
+
export declare const MCP_SERVER_VERSION = "0.3.9";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const MCP_SERVER_NAME = "codetelemetry";
|
|
2
|
-
export const MCP_SERVER_VERSION = "0.3.
|
|
2
|
+
export const MCP_SERVER_VERSION = "0.3.9";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codetelemetry/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "CodeTelemetry MCP server — lets a coding agent onboard a user end to end: authenticate (device code), obtain an ingest key, write the Claude Code OTEL config, send a test event, and confirm telemetry landed — then search, read, interpret and compare the user's own coding sessions, plan the next one, and size tasks, plans and Linear issues from that history. The plaintext key never enters the model's context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/tool-manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"serverName": "codetelemetry",
|
|
3
|
-
"serverVersion": "0.3.
|
|
4
|
-
"registryHash": "
|
|
5
|
-
"toolCount":
|
|
3
|
+
"serverVersion": "0.3.9",
|
|
4
|
+
"registryHash": "cb42092214d900fd605f79977e1251b4b79ed28aae4471d4a224ee1693db021d",
|
|
5
|
+
"toolCount": 21,
|
|
6
6
|
"tools": [
|
|
7
7
|
{
|
|
8
8
|
"name": "authenticate",
|
|
@@ -871,6 +871,73 @@
|
|
|
871
871
|
],
|
|
872
872
|
"additionalProperties": false
|
|
873
873
|
}
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"name": "get_github_pr_gate",
|
|
877
|
+
"title": "Read the GitHub PR gate",
|
|
878
|
+
"description": "Use this when the user wants to set up, check, or understand their CodeTelemetry GitHub PR gate: a required GitHub check that blocks a pull request whose coding session did not meet the workspace's validation policy. Returns the gate exactly as its settings page shows it: the policy (enabled, minScore, missingScore, complexityAware, requireTestBeforePush), the trusted repositories, the GitHub Actions workflow file to commit (actions.workflow.path and its exact content), the check to require (actions.requiredCheck), nextSteps still outstanding, and recent decisions. Setup needs no GitHub token or secret: the workflow authenticates to CodeTelemetry with the OIDC token GitHub mints for each run. Read-only.",
|
|
879
|
+
"inputSchema": {
|
|
880
|
+
"type": "object",
|
|
881
|
+
"properties": {},
|
|
882
|
+
"additionalProperties": false
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "configure_github_pr_gate",
|
|
887
|
+
"title": "Configure the GitHub PR gate",
|
|
888
|
+
"description": "Use this when the user asks to set up or change their CodeTelemetry GitHub PR gate. Change only what they asked for. addRepositories / removeRepositories take owner/repo, owner/* (every repository of that owner), or a github.com URL; the repository you are working in is usually the one to add. Policy: minScore (0-100), missingScore (pass lets a PR with no session or no score through; fail blocks it), complexityAware (simple work needs a lower score), requireTestBeforePush, and enabled. Enabling needs at least one trusted repository. Once the gate is enabled, a change that loosens it (turning it off, lowering minScore, missingScore fail to pass, turning complexityAware on, dropping requireTestBeforePush) is refused with requires_dashboard: the gate judges your own work, so the user makes that change on the settings page. Returns the updated gate. GitHub enforces nothing until the workflow in gate.actions.workflow is committed to each trusted repository's default branch and the check in gate.actions.requiredCheck is required there; howTo says how.",
|
|
889
|
+
"inputSchema": {
|
|
890
|
+
"type": "object",
|
|
891
|
+
"properties": {
|
|
892
|
+
"addRepositories": {
|
|
893
|
+
"type": "array",
|
|
894
|
+
"maxItems": 20,
|
|
895
|
+
"items": {
|
|
896
|
+
"type": "string",
|
|
897
|
+
"minLength": 3,
|
|
898
|
+
"maxLength": 300
|
|
899
|
+
},
|
|
900
|
+
"description": "Repositories to trust: owner/repo, owner/*, or a github.com repository URL."
|
|
901
|
+
},
|
|
902
|
+
"removeRepositories": {
|
|
903
|
+
"type": "array",
|
|
904
|
+
"maxItems": 20,
|
|
905
|
+
"items": {
|
|
906
|
+
"type": "string",
|
|
907
|
+
"minLength": 3,
|
|
908
|
+
"maxLength": 300
|
|
909
|
+
},
|
|
910
|
+
"description": "Repositories to stop trusting. Their checks are then refused, which blocks rather than passes."
|
|
911
|
+
},
|
|
912
|
+
"enabled": {
|
|
913
|
+
"type": "boolean",
|
|
914
|
+
"description": "Turn the gate on. Turning it off is a loosening: the user does that on the settings page."
|
|
915
|
+
},
|
|
916
|
+
"minScore": {
|
|
917
|
+
"type": "integer",
|
|
918
|
+
"minimum": 0,
|
|
919
|
+
"maximum": 100,
|
|
920
|
+
"description": "The validation score a PR's session must reach (default 70)."
|
|
921
|
+
},
|
|
922
|
+
"missingScore": {
|
|
923
|
+
"type": "string",
|
|
924
|
+
"enum": [
|
|
925
|
+
"pass",
|
|
926
|
+
"fail"
|
|
927
|
+
],
|
|
928
|
+
"description": "What happens when no session or no score can be found for a PR (default pass)."
|
|
929
|
+
},
|
|
930
|
+
"complexityAware": {
|
|
931
|
+
"type": "boolean",
|
|
932
|
+
"description": "Trivial work always passes and low-complexity work needs half the score."
|
|
933
|
+
},
|
|
934
|
+
"requireTestBeforePush": {
|
|
935
|
+
"type": "boolean",
|
|
936
|
+
"description": "Every linked session must pass its required checks after its final edit and before pushing."
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
"additionalProperties": false
|
|
940
|
+
}
|
|
874
941
|
}
|
|
875
942
|
]
|
|
876
943
|
}
|