import { Disposable } from "../../../../base/common/lifecycle.js"; import { IObservable, IReaderWithStore } from "../../../../base/common/observable.js"; import { ThemeIcon } from "../../../../base/common/themables.js"; import { IGitHubPullRequestRef } from "../../../services/sessions/common/session.js"; import { GitHubCIOverallStatus, IGitHubPullRequest, IPullRequestIconStatus } from "../common/types.js"; import { IGitHubService } from "./githubService.service.js"; import { IPullRequestIconCache } from "./pullRequestIconCache.service.js"; export interface IResolvedSessionPullRequest { readonly ref: IGitHubPullRequestRef; readonly pullRequest: IGitHubPullRequest | undefined; readonly icon: ThemeIcon | undefined; readonly status: IPullRequestIconStatus; /** Overall checks status for open pull requests, including drafts. */ readonly ciStatus?: GitHubCIOverallStatus; } /** * Resolves live pull-request presentation data shared by session surfaces. * Polling is owned centrally by the GitHub polling contribution. */ export declare class SessionPullRequestPresentationModel extends Disposable { readonly pullRequests: IObservable; readonly icon: IObservable; constructor(pullRequestRefs: IObservable, gitHubService: IGitHubService); } /** * Reads the live {@link IPullRequestIconStatus} for a pull request from the shared * CI and review-thread models. The status only refines open, non-draft pull requests * (where a failing CI check or an unresolved review comment changes the icon), so for * draft, closed, or merged pull requests an empty status is returned. */ export declare function computePullRequestIconStatus(reader: IReaderWithStore, gitHubService: IGitHubService, owner: string, repo: string, livePR: IGitHubPullRequest, ciStatus?: GitHubCIOverallStatus): IPullRequestIconStatus; /** * Computes the session PR status icon from the live, shared pull-request model, refining * open pull requests with their {@link IPullRequestIconStatus} (failing CI, unresolved * comments). See {@link computePullRequestIconStatus}. */ export declare function computeLivePullRequestIcon(reader: IReaderWithStore, gitHubService: IGitHubService, owner: string, repo: string, livePR: IGitHubPullRequest): ThemeIcon; /** Computes the live title and icon used to present a pull request reference. */ export declare function computePullRequestRefPresentation(reader: IReaderWithStore, gitHubService: IGitHubService, iconCache: IPullRequestIconCache, pullRequest: IGitHubPullRequestRef, fallbackIcon?: ThemeIcon): Pick;