/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { ReleaseAsResponse } from "../definitions/ReleaseAsResponse"; import { BasicErrorAsResponse } from "../definitions/BasicErrorAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { ValidationErrorAsResponse } from "../definitions/ValidationErrorAsResponse"; import { ReleaseNotesContentAsResponse } from "../definitions/ReleaseNotesContentAsResponse"; export interface GetReleasesRequest 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 number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type GetReleasesResponseOKType = Array; export interface GetReleasesResponseOK extends GetReleasesResponseOKType { } declare type GetReleasesResponseErrorType = BasicErrorAsResponse; export interface GetReleasesResponseError extends GetReleasesResponseErrorType { } export interface CreateReleaseRequest 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; body: { /** * The name of the tag. */ tag_name: string; /** * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ target_commitish?: string; /** * The name of the release. */ name?: string; /** * Text describing the contents of the tag. */ body?: string; /** * `true` to create a draft (unpublished) release, `false` to create a published one. */ draft?: boolean; /** * `true` to identify the release as a prerelease. `false` to identify the release as a full release. */ prerelease?: boolean; /** * If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ discussion_category_name?: string; /** * Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. */ generate_release_notes?: boolean; /** * Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. */ make_latest?: "true" | "false" | "legacy"; }; } declare type CreateReleaseResponseOKType = ReleaseAsResponse; export interface CreateReleaseResponseOK extends CreateReleaseResponseOKType { } declare type CreateReleaseResponseErrorType = BasicErrorAsResponse & ValidationErrorAsResponse; export interface CreateReleaseResponseError extends CreateReleaseResponseErrorType { } export interface GenerateReleaseNotesRequest 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; body: { /** * The tag name for the release. This can be an existing tag or a new one. */ tag_name: string; /** * Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ target_commitish?: string; /** * The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ previous_tag_name?: string; /** * Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ configuration_file_path?: string; }; } declare type GenerateReleaseNotesResponseOKType = ReleaseNotesContentAsResponse; export interface GenerateReleaseNotesResponseOK extends GenerateReleaseNotesResponseOKType { } declare type GenerateReleaseNotesResponseErrorType = BasicErrorAsResponse; export interface GenerateReleaseNotesResponseError extends GenerateReleaseNotesResponseErrorType { } export interface GetLatestReleaseRequest 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; } declare type GetLatestReleaseResponseOKType = ReleaseAsResponse; export interface GetLatestReleaseResponseOK extends GetLatestReleaseResponseOKType { } export declare type GetLatestReleaseResponseError = undefined; export interface GetReleaseByTagNameRequest 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; /** * tag parameter */ tag: string; } declare type GetReleaseByTagNameResponseOKType = ReleaseAsResponse; export interface GetReleaseByTagNameResponseOK extends GetReleaseByTagNameResponseOKType { } declare type GetReleaseByTagNameResponseErrorType = BasicErrorAsResponse; export interface GetReleaseByTagNameResponseError extends GetReleaseByTagNameResponseErrorType { } export interface GetReleaseRequest 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 unique identifier of the release. */ release_id: number; } declare type GetReleaseResponseOKType = ReleaseAsResponse; export interface GetReleaseResponseOK extends GetReleaseResponseOKType { } declare type GetReleaseResponseErrorType = BasicErrorAsResponse; export interface GetReleaseResponseError extends GetReleaseResponseErrorType { } export interface UpdateReleaseRequest 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 unique identifier of the release. */ release_id: number; body: { /** * The name of the tag. */ tag_name?: string; /** * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ target_commitish?: string; /** * The name of the release. */ name?: string; /** * Text describing the contents of the tag. */ body?: string; /** * `true` makes the release a draft, and `false` publishes the release. */ draft?: boolean; /** * `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ prerelease?: boolean; /** * Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. */ make_latest?: "true" | "false" | "legacy"; /** * If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ discussion_category_name?: string; }; } declare type UpdateReleaseResponseOKType = ReleaseAsResponse; export interface UpdateReleaseResponseOK extends UpdateReleaseResponseOKType { } declare type UpdateReleaseResponseErrorType = BasicErrorAsResponse; export interface UpdateReleaseResponseError extends UpdateReleaseResponseErrorType { } export interface DeleteReleaseRequest 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 unique identifier of the release. */ release_id: number; } export declare type DeleteReleaseResponseOK = undefined; export declare type DeleteReleaseResponseError = undefined; export {}; //# sourceMappingURL=release.d.ts.map