MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / updateCheckRun

Function updateCheckRun

apps/web/src/lib/integrations/platforms/github/adapter.ts:1388–1422  ·  view source on GitHub ↗
(
  installationId: string,
  owner: string,
  repo: string,
  checkRunId: number,
  options: {
    status?: 'queued' | 'in_progress' | 'completed';
    conclusion?: CheckRunConclusion;
    detailsUrl?: string;
    output?: CheckRunOutput;
  },
  appType: GitHubAppType = 'standard'
)

Source from the content-addressed store, hash-verified

1386/**
1387 * Bound on the commit pages walked when a session head SHA is not the PR head.
1388 * 100 commits per page, so at most 1 + `MAX_COMMIT_PAGES` GitHub calls. A
1389 * session SHA beyond this window is treated as unverified (no PR shown) rather
1390 * than paging through thousands of commits.
1391 */
1392const MAX_COMMIT_PAGES = 10;
1393const COMMITS_PER_PAGE = 100;
1394
1395/**
1396 * Thrown when GitHub returns a rate-limit response. The caller can surface
1397 * `resetAt` to the user so they know when to retry.
1398 */
1399export class GitHubRateLimitError extends Error {
1400 public readonly resetAt: Date;
1401 constructor(resetAt: Date) {
1402 super(`GitHub rate limited until ${resetAt.toISOString()}`);
1403 this.name = 'GitHubRateLimitError';
1404 this.resetAt = resetAt;
1405 }
1406}
1407
1408/**
1409 * Thrown when a GraphQL response body reports a top-level `errors` list or
1410 * omits data the caller asked for. GitHub answers those with HTTP 200, so
1411 * without this the failed read would look like a definite answer and callers
1412 * would store it as one.
1413 */
1414export class GitHubGraphQlError extends Error {
1415 constructor(message: string) {
1416 super(message);
1417 this.name = 'GitHubGraphQlError';
1418 }
1419}
1420
1421/**
1422 * Thrown when GitHub rejects the App credentials with a 401 on the
1423 * installation-token mint in {@link getCollaboratorPermissionLevel}. A mint
1424 * 401 means the App ID or private key Kilo configured is not accepted, a
1425 * persistent Kilo-side configuration failure that no retry or fresh mint can

Callers 6

updatePRGateCheckFunction · 0.90
recreatePRGateCheckFunction · 0.90
cancelPRGateCheckFunction · 0.90

Calls 2

updateMethod · 0.65

Tested by

no test coverage detected