Skip to content
Closed
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
21 changes: 21 additions & 0 deletions apps/gittensory-ui/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import { Route as AppCommandsRouteImport } from './routes/app.commands'
import { Route as AppAuditRouteImport } from './routes/app.audit'
import { Route as AppAnalyticsRouteImport } from './routes/app.analytics'
import { Route as ApiOpRouteImport } from './routes/api.$op'
import { Route as ReposOwnerRepoQualityRouteImport } from './routes/repos.$owner.$repo.quality'

const RoadmapRoute = RoadmapRouteImport.update({
id: '/roadmap',
Expand Down Expand Up @@ -363,6 +364,11 @@ const ApiOpRoute = ApiOpRouteImport.update({
path: '/$op',
getParentRoute: () => ApiRoute,
} as any)
const ReposOwnerRepoQualityRoute = ReposOwnerRepoQualityRouteImport.update({
id: '/repos/$owner/$repo/quality',
path: '/repos/$owner/$repo/quality',
getParentRoute: () => rootRouteImport,
} as any)

export interface FileRoutesByFullPath {
'/': typeof IndexRoute
Expand Down Expand Up @@ -422,6 +428,7 @@ export interface FileRoutesByFullPath {
'/api/': typeof ApiIndexRoute
'/app/': typeof AppIndexRoute
'/docs/': typeof DocsIndexRoute
'/repos/$owner/$repo/quality': typeof ReposOwnerRepoQualityRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
Expand Down Expand Up @@ -478,6 +485,7 @@ export interface FileRoutesByTo {
'/api': typeof ApiIndexRoute
'/app': typeof AppIndexRoute
'/docs': typeof DocsIndexRoute
'/repos/$owner/$repo/quality': typeof ReposOwnerRepoQualityRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
Expand Down Expand Up @@ -538,6 +546,7 @@ export interface FileRoutesById {
'/api/': typeof ApiIndexRoute
'/app/': typeof AppIndexRoute
'/docs/': typeof DocsIndexRoute
'/repos/$owner/$repo/quality': typeof ReposOwnerRepoQualityRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
Expand Down Expand Up @@ -599,6 +608,7 @@ export interface FileRouteTypes {
| '/api/'
| '/app/'
| '/docs/'
| '/repos/$owner/$repo/quality'
fileRoutesByTo: FileRoutesByTo
to:
| '/'
Expand Down Expand Up @@ -655,6 +665,7 @@ export interface FileRouteTypes {
| '/api'
| '/app'
| '/docs'
| '/repos/$owner/$repo/quality'
id:
| '__root__'
| '/'
Expand Down Expand Up @@ -714,6 +725,7 @@ export interface FileRouteTypes {
| '/api/'
| '/app/'
| '/docs/'
| '/repos/$owner/$repo/quality'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
Expand All @@ -727,6 +739,7 @@ export interface RootRouteChildren {
MaintainersRoute: typeof MaintainersRoute
MinersRoute: typeof MinersRoute
RoadmapRoute: typeof RoadmapRoute
ReposOwnerRepoQualityRoute: typeof ReposOwnerRepoQualityRoute
}

declare module '@tanstack/react-router' {
Expand Down Expand Up @@ -1130,6 +1143,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ApiOpRouteImport
parentRoute: typeof ApiRoute
}
'/repos/$owner/$repo/quality': {
id: '/repos/$owner/$repo/quality'
path: '/repos/$owner/$repo/quality'
fullPath: '/repos/$owner/$repo/quality'
preLoaderRoute: typeof ReposOwnerRepoQualityRouteImport
parentRoute: typeof rootRouteImport
}
}
}

Expand Down Expand Up @@ -1262,6 +1282,7 @@ const rootRouteChildren: RootRouteChildren = {
MaintainersRoute: MaintainersRoute,
MinersRoute: MinersRoute,
RoadmapRoute: RoadmapRoute,
ReposOwnerRepoQualityRoute: ReposOwnerRepoQualityRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
Expand Down
3 changes: 2 additions & 1 deletion apps/gittensory-ui/src/routes/docs.tuning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@
<code>includeMaintainerAuthors</code> (default <code>false</code>),{" "}
<code>requireLinkedIssue</code> (default <code>false</code>), <code>backfillEnabled</code>{" "}
(default <code>true</code>), <code>privateTrustEnabled</code> (default <code>true</code>),
and <code>badgeEnabled</code> (README status badge, default <code>false</code>).
and <code>badgeEnabled</code> (README status badge, default <code>false</code>),

Check failure on line 461 in apps/gittensory-ui/src/routes/docs.tuning.tsx

View workflow job for this annotation

GitHub Actions / validate-code

Insert `·and{"·"}`
and <code>publicQualityMetrics</code> (public review-quality page, default <code>false</code>).

Check failure on line 462 in apps/gittensory-ui/src/routes/docs.tuning.tsx

View workflow job for this annotation

GitHub Actions / validate-code

Replace `·and·<code>publicQualityMetrics</code>·(public·review-quality·page,·default·<code>false</code>` with `·<code>publicQualityMetrics</code>·(public·review-quality·page,·default·<code>false</code>⏎··········`
</li>
<li>
<code>agentPaused</code> (per-repo kill-switch, default <code>false</code>) and{" "}
Expand Down
Loading
Loading