/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { CommitAsResponse } from "../definitions/CommitAsResponse"; import { BasicErrorAsResponse } from "../definitions/BasicErrorAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { BranchShortAsResponse } from "../definitions/BranchShortAsResponse"; import { ValidationErrorAsResponse } from "../definitions/ValidationErrorAsResponse"; import { PullRequestSimpleAsResponse } from "../definitions/PullRequestSimpleAsResponse"; import { CommitComparisonAsResponse } from "../definitions/CommitComparisonAsResponse"; export interface GetCommitsRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). */ sha?: string; /** * Only commits containing this file path will be returned. */ path?: string; /** * GitHub username or email address to use to filter by commit author. */ author?: string; /** * GitHub username or email address to use to filter by commit committer. */ committer?: string; /** * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ since?: string; /** * Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ until?: string; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type GetCommitsResponseOKType = Array; export interface GetCommitsResponseOK extends GetCommitsResponseOKType { } declare type GetCommitsResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse; export interface GetCommitsResponseError extends GetCommitsResponseErrorType { } export interface GetBranchesForHeadCommitRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * The SHA of the commit. */ commit_sha: string; } declare type GetBranchesForHeadCommitResponseOKType = Array; export interface GetBranchesForHeadCommitResponseOK extends GetBranchesForHeadCommitResponseOKType { } declare type GetBranchesForHeadCommitResponseErrorType = ValidationErrorAsResponse; export interface GetBranchesForHeadCommitResponseError extends GetBranchesForHeadCommitResponseErrorType { } export interface GetPullRequestsForCommitRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * The SHA of the commit. */ commit_sha: string; } declare type GetPullRequestsForCommitResponseOKType = Array; export interface GetPullRequestsForCommitResponseOK extends GetPullRequestsForCommitResponseOKType { } export declare type GetPullRequestsForCommitResponseError = undefined; export interface GetCommitRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * ref parameter */ ref: string; /** * Page number of the results to fetch. */ page?: number; /** * The number of results per page (max 100). */ per_page?: number; } declare type GetCommitResponseOKType = CommitAsResponse; export interface GetCommitResponseOK extends GetCommitResponseOKType { } declare type GetCommitResponseErrorType = BasicErrorAsResponse & ValidationErrorAsResponse & BasicErrorAsResponse & { code?: string; message?: string; documentation_url?: string; }; export interface GetCommitResponseError extends GetCommitResponseErrorType { } export interface CompareCommitsRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`. */ basehead: string; /** * Page number of the results to fetch. */ page?: number; /** * The number of results per page (max 100). */ per_page?: number; } declare type CompareCommitsResponseOKType = CommitComparisonAsResponse; export interface CompareCommitsResponseOK extends CompareCommitsResponseOKType { } declare type CompareCommitsResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & { code?: string; message?: string; documentation_url?: string; }; export interface CompareCommitsResponseError extends CompareCommitsResponseErrorType { } export {}; //# sourceMappingURL=commit.d.ts.map