export declare enum GitHubPullRequestReviewCommentState { Pending = "PENDING", Submitted = "SUBMITTED" } /** * A review comment associated with a pull request in GitHub. * * @see https://docs.github.com/en/graphql/reference/objects#pullrequestreviewcomment */ export type GitHubPullRequestReviewComment = { author: { login: string; avatarUrl: string; }; authorAssociation: string; body: string; bodyHTML: string; createdAt: string; commit: { oid: string; }; /** * The databaseId is used to run operations on a comment with GitHub's REST * API. For operations performed with the GraphQL API, use the comment's id. */ databaseId: number; diffHunk: string; id: string; originalCommit: { oid: string; } | null; state: GitHubPullRequestReviewCommentState; updatedAt: string; url: string; viewerCanDelete: boolean; viewerCanUpdate: boolean; viewerDidAuthor: boolean; }; /** * A threaded list of GitHubPullRequestReviewComments for a given pull request * in GitHub. * * @see https://docs.github.com/en/graphql/reference/objects#pullrequestreviewthread */ export type GitHubPullRequestReviewThread = { comments: { nodes: GitHubPullRequestReviewComment[]; }; diffSide: GitHubCodeReviewCommentSide; id: string; isCollapsed: boolean; isOutdated: boolean; isResolved: boolean; resolvedBy: { login: string; } | null; viewerCanReply: boolean; viewerCanResolve: boolean; viewerCanUnresolve: boolean; line: number | null; originalLine: number | null; originalStartLine: number | null; path: string; }; /** * The possible sides of a diff in GitHub. * * @see https://docs.github.com/en/graphql/reference/enums#diffside */ export declare enum GitHubCodeReviewCommentSide { Left = "LEFT", Right = "RIGHT" } /** * @see https://docs.github.com/en/graphql/reference/enums#pullrequeststate */ export type GitHubPullRequestState = "OPEN" | "CLOSED" | "MERGED"; /** * @see https://docs.github.com/en/graphql/reference/enums#pullrequestreviewdecision */ export type GitHubPullRequestReviewDecision = "APPROVED" | "CHANGES_REQUESTED" | "REVIEW_REQUIRED"; export declare enum GitHubPullRequestReviewState { Commented = "COMMENTED", Approved = "APPROVED", Pending = "PENDING", ChangedRequested = "CHANGES_REQUESTED", Dismissed = "DISMISSED" } /** * @see https://docs.github.com/en/graphql/reference/enums#pullrequestreviewevent */ export declare enum GitHubPullRequestReviewEvent { Comment = "COMMENT", Approve = "APPROVE", RequestChanges = "REQUEST_CHANGES", Dismiss = "DISMISS" } /** * @see https://docs.github.com/en/graphql/reference/objects#pullrequestreview */ export type GitHubPullRequestReview = { author: { avatarUrl: string; login: string; }; body: string; state: GitHubPullRequestReviewState; id: string; databaseId: number; updatedAt: string; createdAt: string; comments: { nodes: GitHubPullRequestReviewComment[]; }; }; /** * @see https://docs.github.com/en/graphql/reference/input-objects#draftpullrequestreviewthread */ export type GitHubDraftPullRequestReviewThread = { body: string; line: number; path: string; side?: GitHubCodeReviewCommentSide; startLine?: number; startSide?: GitHubCodeReviewCommentSide; }; export type GitHubAddPullRequestReviewThreadInput = { /** * Body of the thread's first comment. */ body: string; /** * The line of the blob to which the thread refers. The end of the line range * for multi-line comments. */ line: number; /** * Path to the file being commented on. */ path: string; /** * The node ID of the pull request being reviewed. */ pullRequestId?: string; /** * The Node ID of the review to modify. */ pullRequestReviewId?: string; /** * The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range. */ side?: GitHubCodeReviewCommentSide; /** * The first line of the range to which the comment refers. */ startLine?: number; /** * The side of the diff on which the start line resides. */ startSide?: GitHubCodeReviewCommentSide; }; export type GitHubAddPullRequestReviewCommentInput = { body: string; clientMutationId?: string; commitOID?: string; inReplyTo?: string; path?: string; position?: number; pullRequestId?: string; pullRequestReviewId?: string; }; export declare enum GitHubFileStatus { Added = "added", Modified = "modified", Renamed = "renamed", Removed = "removed", Unchanged = "unchanged" } type GitHubFileBase = { filename: string; sha: string; additions: number; changes: number; deletions: number; blob_url: string; contents_url: string; raw_url: string; previous_filename?: string; content?: string; }; type GitHubFileRenamed = { status: GitHubFileStatus.Renamed; previous_filename: string; patch?: string; } & GitHubFileBase; type GitHubFileAdded = { status: GitHubFileStatus.Added; patch: string; } & GitHubFileBase; type GitHubFileModified = { status: GitHubFileStatus.Modified; patch: string; } & GitHubFileBase; type GitHubFileRemoved = { status: GitHubFileStatus.Removed; patch: string; } & GitHubFileBase; type GitHubFileUnchanged = { status: GitHubFileStatus.Unchanged; filename: string; patch?: string; } & Partial; export type GitHubFile = GitHubFileAdded | GitHubFileModified | GitHubFileRemoved | GitHubFileRenamed | GitHubFileUnchanged; /** * A GitHub pull request fetched through the GraphQL API. */ export type GitHubPullRequestDetails = { author: { avatarUrl: string; login: string; url: string; }; databaseId: number; /** The PR description without any formatting */ body: string; /** The PR description parsed as HTML */ bodyHTML: string; id: string; number: number; reviewDecision: GitHubPullRequestReviewDecision; state: GitHubPullRequestState; /** Title of the pull request */ title: string; headRefOid: string; /** Branch name of the head ref */ headRefName: string; baseRefOid: string; /** Branch name of the base ref */ baseRefName: string; repository: { url: string; }; url: string; commits: { totalCount: number; }; baseRepository: { url: string; }; headRepository: { url: string; }; }; export type GitHubPullRequestComment = { id: string; databaseId: string; body: string; bodyHTML: string; author: { login: string; avatarUrl: string; url: string; }; authorAssociation: string; url: string; updatedAt: string; createdAt: string; }; export type GithubLabel = { id: string; name: string; color: string; description: string; }; export {}; //# sourceMappingURL=githubTypes.d.ts.map