@pulumi/github
Version:
A Pulumi package for creating and managing github cloud resources.
90 lines (89 loc) • 2.25 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this data source to retrieve information about a repository ref.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* const development = github.getRef({
* owner: "example",
* repository: "example",
* ref: "heads/development",
* });
* ```
*/
export declare function getRef(args: GetRefArgs, opts?: pulumi.InvokeOptions): Promise<GetRefResult>;
/**
* A collection of arguments for invoking getRef.
*/
export interface GetRefArgs {
/**
* Owner of the repository.
*/
owner?: string;
/**
* The repository ref to look up. Must be formatted `heads/<ref>` for branches, and `tags/<ref>` for tags.
*/
ref: string;
/**
* The GitHub repository name.
*/
repository: string;
}
/**
* A collection of values returned by getRef.
*/
export interface GetRefResult {
/**
* An etag representing the ref.
*/
readonly etag: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly owner?: string;
readonly ref: string;
readonly repository: string;
/**
* A string storing the reference's `HEAD` commit's SHA1.
*/
readonly sha: string;
}
/**
* Use this data source to retrieve information about a repository ref.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* const development = github.getRef({
* owner: "example",
* repository: "example",
* ref: "heads/development",
* });
* ```
*/
export declare function getRefOutput(args: GetRefOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetRefResult>;
/**
* A collection of arguments for invoking getRef.
*/
export interface GetRefOutputArgs {
/**
* Owner of the repository.
*/
owner?: pulumi.Input<string>;
/**
* The repository ref to look up. Must be formatted `heads/<ref>` for branches, and `tags/<ref>` for tags.
*/
ref: pulumi.Input<string>;
/**
* The GitHub repository name.
*/
repository: pulumi.Input<string>;
}