@pulumi/github
Version:
A Pulumi package for creating and managing github cloud resources.
197 lines (196 loc) • 5.62 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a GitHub issue resource.
*
* This resource allows you to create and manage issue within your
* GitHub repository.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* // Create a simple issue
* const test = new github.Repository("test", {
* name: "tf-acc-test-%s",
* autoInit: true,
* hasIssues: true,
* });
* const testIssue = new github.Issue("test", {
* repository: test.name,
* title: "My issue title",
* body: "The body of my issue",
* });
* ```
*
* ### With Milestone And Project Assignment
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
* import * as std from "@pulumi/std";
*
* // Create an issue with milestone and project assignment
* const test = new github.Repository("test", {
* name: "tf-acc-test-%s",
* autoInit: true,
* hasIssues: true,
* });
* const testRepositoryMilestone = new github.RepositoryMilestone("test", {
* owner: std.splitOutput({
* separator: "/",
* text: test.fullName,
* }).apply(invoke => invoke.result?.[0]),
* repository: test.name,
* title: "v1.0.0",
* description: "General Availability",
* dueDate: "2022-11-22",
* state: "open",
* });
* const testIssue = new github.Issue("test", {
* repository: test.name,
* title: "My issue",
* body: "My issue body",
* labels: [
* "bug",
* "documentation",
* ],
* assignees: ["bob-github"],
* milestoneNumber: testRepositoryMilestone.number,
* });
* ```
*
* ## Import
*
* GitHub Issues can be imported using an ID made up of `repository:number`, e.g.
*
* ```sh
* $ pulumi import github:index/issue:Issue issue_15 myrepo:15
* ```
*/
export declare class Issue extends pulumi.CustomResource {
/**
* Get an existing Issue resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IssueState, opts?: pulumi.CustomResourceOptions): Issue;
/**
* Returns true if the given object is an instance of Issue. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Issue;
/**
* List of Logins to assign the to the issue
*/
readonly assignees: pulumi.Output<string[] | undefined>;
/**
* Body of the issue
*/
readonly body: pulumi.Output<string | undefined>;
readonly etag: pulumi.Output<string>;
/**
* (Computed) - The issue id
*/
readonly issueId: pulumi.Output<number>;
/**
* List of labels to attach to the issue
*/
readonly labels: pulumi.Output<string[] | undefined>;
/**
* Milestone number to assign to the issue
*/
readonly milestoneNumber: pulumi.Output<number | undefined>;
/**
* (Computed) - The issue number
*/
readonly number: pulumi.Output<number>;
/**
* The GitHub repository name
*/
readonly repository: pulumi.Output<string>;
/**
* Title of the issue
*/
readonly title: pulumi.Output<string>;
/**
* Create a Issue resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: IssueArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Issue resources.
*/
export interface IssueState {
/**
* List of Logins to assign the to the issue
*/
assignees?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Body of the issue
*/
body?: pulumi.Input<string>;
etag?: pulumi.Input<string>;
/**
* (Computed) - The issue id
*/
issueId?: pulumi.Input<number>;
/**
* List of labels to attach to the issue
*/
labels?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Milestone number to assign to the issue
*/
milestoneNumber?: pulumi.Input<number>;
/**
* (Computed) - The issue number
*/
number?: pulumi.Input<number>;
/**
* The GitHub repository name
*/
repository?: pulumi.Input<string>;
/**
* Title of the issue
*/
title?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Issue resource.
*/
export interface IssueArgs {
/**
* List of Logins to assign the to the issue
*/
assignees?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Body of the issue
*/
body?: pulumi.Input<string>;
/**
* List of labels to attach to the issue
*/
labels?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Milestone number to assign to the issue
*/
milestoneNumber?: pulumi.Input<number>;
/**
* The GitHub repository name
*/
repository: pulumi.Input<string>;
/**
* Title of the issue
*/
title: pulumi.Input<string>;
}