@pulumi/github
Version:
A Pulumi package for creating and managing github cloud resources.
83 lines (82 loc) • 2.75 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* Use this data source to retrieve information about branches in a repository.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* const example = github.getRepositoryBranches({
* repository: "example-repository",
* });
* ```
*/
export declare function getRepositoryBranches(args: GetRepositoryBranchesArgs, opts?: pulumi.InvokeOptions): Promise<GetRepositoryBranchesResult>;
/**
* A collection of arguments for invoking getRepositoryBranches.
*/
export interface GetRepositoryBranchesArgs {
/**
* . If true, the `branches` attributes will be populated only with non protected branches. Default: `false`.
*/
onlyNonProtectedBranches?: boolean;
/**
* . If true, the `branches` attributes will be populated only with protected branches. Default: `false`.
*/
onlyProtectedBranches?: boolean;
/**
* Name of the repository to retrieve the branches from.
*/
repository: string;
}
/**
* A collection of values returned by getRepositoryBranches.
*/
export interface GetRepositoryBranchesResult {
/**
* The list of this repository's branches. Each element of `branches` has the following attributes:
*/
readonly branches: outputs.GetRepositoryBranchesBranch[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly onlyNonProtectedBranches?: boolean;
readonly onlyProtectedBranches?: boolean;
readonly repository: string;
}
/**
* Use this data source to retrieve information about branches in a repository.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* const example = github.getRepositoryBranches({
* repository: "example-repository",
* });
* ```
*/
export declare function getRepositoryBranchesOutput(args: GetRepositoryBranchesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetRepositoryBranchesResult>;
/**
* A collection of arguments for invoking getRepositoryBranches.
*/
export interface GetRepositoryBranchesOutputArgs {
/**
* . If true, the `branches` attributes will be populated only with non protected branches. Default: `false`.
*/
onlyNonProtectedBranches?: pulumi.Input<boolean>;
/**
* . If true, the `branches` attributes will be populated only with protected branches. Default: `false`.
*/
onlyProtectedBranches?: pulumi.Input<boolean>;
/**
* Name of the repository to retrieve the branches from.
*/
repository: pulumi.Input<string>;
}