Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gittensory.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,9 @@ settings:
# Render a README status badge for the repo. Bool. Default: false.
badgeEnabled: false

# Publish a public per-repo review-quality page. Bool. Default: false.
publicQualityMetrics: false

# Per-repo kill-switch: when true, the agent does nothing on this repo.
# Bool. Default: false.
agentPaused: false
Expand Down
205 changes: 205 additions & 0 deletions apps/gittensory-ui/public/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -9241,6 +9241,9 @@
"updatedAt": {
"type": "string",
"nullable": true
},
"publicQualityMetrics": {
"type": "boolean"
}
},
"required": [
Expand Down Expand Up @@ -9959,6 +9962,9 @@
"defaultAllowed",
"commandOverrides"
]
},
"publicQualityMetrics": {
"type": "boolean"
}
},
"required": [
Expand Down Expand Up @@ -9987,6 +9993,7 @@
"includeMaintainerAuthors",
"requireLinkedIssue",
"badgeEnabled",
"publicQualityMetrics",
"aiReviewMode",
"aiReviewByok",
"aiReviewProvider",
Expand Down Expand Up @@ -13416,6 +13423,164 @@
"maintainerNextSteps",
"privateSummary"
]
},
"PublicQualityMetrics": {
"type": "object",
"properties": {
"repoFullName": {
"type": "string"
},
"generatedAt": {
"type": "string"
},
"gate": {
"type": "object",
"properties": {
"blocked": {
"type": "number"
},
"blockedThenMerged": {
"type": "number"
},
"falsePositiveRate": {
"type": "number",
"nullable": true
},
"precisionPct": {
"type": "number",
"nullable": true
},
"topGateTypes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gateType": {
"type": "string"
},
"blocked": {
"type": "number"
},
"blockedThenMerged": {
"type": "number"
},
"falsePositiveRate": {
"type": "number",
"nullable": true
},
"precisionPct": {
"type": "number",
"nullable": true
}
},
"required": [
"gateType",
"blocked",
"blockedThenMerged",
"falsePositiveRate",
"precisionPct"
]
}
}
},
"required": [
"blocked",
"blockedThenMerged",
"falsePositiveRate",
"precisionPct",
"topGateTypes"
]
},
"outcomes": {
"type": "object",
"properties": {
"merged": {
"type": "number"
},
"closed": {
"type": "number"
},
"mergeRatioPct": {
"type": "number",
"nullable": true
}
},
"required": [
"merged",
"closed",
"mergeRatioPct"
]
},
"slop": {
"type": "object",
"properties": {
"totalResolved": {
"type": "number"
},
"overallMergeRate": {
"type": "number",
"nullable": true
},
"discriminates": {
"type": "boolean",
"nullable": true
}
},
"required": [
"totalResolved",
"overallMergeRate",
"discriminates"
]
},
"trend": {
"type": "array",
"items": {
"type": "object",
"properties": {
"weekStart": {
"type": "string"
},
"gateBlocked": {
"type": "number"
},
"gateBlockedThenMerged": {
"type": "number"
},
"gateFalsePositiveRate": {
"type": "number",
"nullable": true
},
"outcomesMerged": {
"type": "number"
},
"outcomesClosed": {
"type": "number"
},
"mergeRatioPct": {
"type": "number",
"nullable": true
}
},
"required": [
"weekStart",
"gateBlocked",
"gateBlockedThenMerged",
"gateFalsePositiveRate",
"outcomesMerged",
"outcomesClosed",
"mergeRatioPct"
]
}
}
},
"required": [
"repoFullName",
"generatedAt",
"gate",
"outcomes",
"slop",
"trend"
]
}
},
"parameters": {},
Expand Down Expand Up @@ -16517,6 +16682,46 @@
}
]
}
},
"/v1/public/repos/{owner}/{repo}/quality": {
"get": {
"parameters": [
{
"schema": {
"type": "string"
},
"required": true,
"name": "owner",
"in": "path"
},
{
"schema": {
"type": "string"
},
"required": true,
"name": "repo",
"in": "path"
}
],
"responses": {
"200": {
"description": "Public per-repo review-quality metrics: gate false-positive rates, merge-vs-close ratio, and weekly trend. Aggregate counts only; opt-in via publicQualityMetrics.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PublicQualityMetrics"
}
}
}
},
"404": {
"description": "Repo is unknown/private/uninstalled or has not opted in"
},
"503": {
"description": "Public quality metrics are temporarily unavailable"
}
}
}
}
},
"servers": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type MaintainerSettings = {
includeMaintainerAuthors: boolean;
requireLinkedIssue: boolean;
badgeEnabled: boolean;
publicQualityMetrics: boolean;
commandAuthorization: CommandAuthorization;
autonomy: Partial<Record<AgentActionClass, AutonomyLevel>>;
autoMaintain: { requireApprovals: number; mergeMethod: AutoMergeMethod };
Expand Down Expand Up @@ -107,6 +108,7 @@ const EDITABLE_KEYS: Array<keyof MaintainerSettings> = [
"includeMaintainerAuthors",
"requireLinkedIssue",
"badgeEnabled",
"publicQualityMetrics",
"commandAuthorization",
"autonomy",
"autoMaintain",
Expand Down Expand Up @@ -265,6 +267,7 @@ const SURFACE_FIELDS: FieldDef[] = [
{ key: "includeMaintainerAuthors", label: "Include maintainer-authored PRs", kind: "toggle" },
{ key: "requireLinkedIssue", label: "Require a linked issue", kind: "toggle" },
{ key: "badgeEnabled", label: "Repo badge", kind: "toggle" },
{ key: "publicQualityMetrics", label: "Public quality page", kind: "toggle" },
];

function repoApiBase(repoFullName: string): string | null {
Expand Down
Loading
Loading