import { CancellationToken } from "../../../../../base/common/cancellation.js"; import { IDisposable } from "../../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../../base/common/observable.js"; import { PullRequestChecks } from "../../../../../platform/github/common/githubPullRequestService.js"; import { IWorkbenchGitHubService } from "../../../../../workbench/services/github/common/githubService.service.js"; /** A live subscription to the checks of a pull request. */ export interface IPullRequestChecksSubscription extends IDisposable { /** * The checks of the head the shared resources last read, kept while they * reread them, or `undefined` until they were first read. */ readonly checks: IObservable; refresh(authoritative: boolean, token?: CancellationToken): Promise; } /** * Tells which checks of a pull request are required, and which checks a * required check that has not finished waits for. They come from the shared * GitHub pull request resources, which the agent host reads the same way, so * every surface agrees on which failures count. */ export interface IPullRequestChecksSource { /** * @param headSha The head whose checks the subscriber reads. A refresh * first rereads the pull request while the shared resources have not seen * that head yet, as right after a push, since they only read the checks of * the head they last saw. */ subscribe(owner: string, repo: string, prNumber: number, headSha: string, signal: AbortSignal): Promise; } export declare class PullRequestChecksSource implements IPullRequestChecksSource { private readonly _gitHubService; constructor(_gitHubService: IWorkbenchGitHubService); subscribe(owner: string, repo: string, prNumber: number, headSha: string, signal: AbortSignal): Promise; }