IssueArgs

data class IssueArgs(val assignees: Output<List<String>>? = null, val body: Output<String>? = null, val labels: Output<List<String>>? = null, val milestoneNumber: Output<Int>? = null, val repository: Output<String>? = null, val title: Output<String>? = null) : ConvertibleToJava<IssueArgs>

Provides a GitHub issue resource. This resource allows you to create and manage issue within your GitHub repository.

Example Usage

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",
});
import pulumi
import pulumi_github as github
# Create a simple issue
test = github.Repository("test",
name="tf-acc-test-%s",
auto_init=True,
has_issues=True)
test_issue = github.Issue("test",
repository=test.name,
title="My issue title",
body="The body of my issue")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
// Create a simple issue
var test = new Github.Repository("test", new()
{
Name = "tf-acc-test-%s",
AutoInit = true,
HasIssues = true,
});
var testIssue = new Github.Issue("test", new()
{
Repository = test.Name,
Title = "My issue title",
Body = "The body of my issue",
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a simple issue
test, err := github.NewRepository(ctx, "test", &github.RepositoryArgs{
Name: pulumi.String("tf-acc-test-%s"),
AutoInit: pulumi.Bool(true),
HasIssues: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = github.NewIssue(ctx, "test", &github.IssueArgs{
Repository: test.Name,
Title: pulumi.String("My issue title"),
Body: pulumi.String("The body of my issue"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.Issue;
import com.pulumi.github.IssueArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Create a simple issue
var test = new Repository("test", RepositoryArgs.builder()
.name("tf-acc-test-%s")
.autoInit(true)
.hasIssues(true)
.build());
var testIssue = new Issue("testIssue", IssueArgs.builder()
.repository(test.name())
.title("My issue title")
.body("The body of my issue")
.build());
}
}
resources:
# Create a simple issue
test:
type: github:Repository
properties:
name: tf-acc-test-%s
autoInit: true
hasIssues: true
testIssue:
type: github:Issue
name: test
properties:
repository: ${test.name}
title: My issue title
body: The body of my issue

With Milestone And Project Assignment

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 pulumi
import pulumi_github as github
import pulumi_std as std
# Create an issue with milestone and project assignment
test = github.Repository("test",
name="tf-acc-test-%s",
auto_init=True,
has_issues=True)
test_repository_milestone = github.RepositoryMilestone("test",
owner=std.split_output(separator="/",
text=test.full_name).apply(lambda invoke: invoke.result[0]),
repository=test.name,
title="v1.0.0",
description="General Availability",
due_date="2022-11-22",
state="open")
test_issue = github.Issue("test",
repository=test.name,
title="My issue",
body="My issue body",
labels=[
"bug",
"documentation",
],
assignees=["bob-github"],
milestone_number=test_repository_milestone.number)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
// Create an issue with milestone and project assignment
var test = new Github.Repository("test", new()
{
Name = "tf-acc-test-%s",
AutoInit = true,
HasIssues = true,
});
var testRepositoryMilestone = new Github.RepositoryMilestone("test", new()
{
Owner = Std.Split.Invoke(new()
{
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",
});
var testIssue = new Github.Issue("test", new()
{
Repository = test.Name,
Title = "My issue",
Body = "My issue body",
Labels = new[]
{
"bug",
"documentation",
},
Assignees = new[]
{
"bob-github",
},
MilestoneNumber = testRepositoryMilestone.Number,
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create an issue with milestone and project assignment
test, err := github.NewRepository(ctx, "test", &github.RepositoryArgs{
Name: pulumi.String("tf-acc-test-%s"),
AutoInit: pulumi.Bool(true),
HasIssues: pulumi.Bool(true),
})
if err != nil {
return err
}
testRepositoryMilestone, err := github.NewRepositoryMilestone(ctx, "test", &github.RepositoryMilestoneArgs{
Owner: pulumi.String(std.SplitOutput(ctx, std.SplitOutputArgs{
Separator: pulumi.String("/"),
Text: test.FullName,
}, nil).ApplyT(func(invoke std.SplitResult) (*string, error) {
return invoke.Result[0], nil
}).(pulumi.StringPtrOutput)),
Repository: test.Name,
Title: pulumi.String("v1.0.0"),
Description: pulumi.String("General Availability"),
DueDate: pulumi.String("2022-11-22"),
State: pulumi.String("open"),
})
if err != nil {
return err
}
_, err = github.NewIssue(ctx, "test", &github.IssueArgs{
Repository: test.Name,
Title: pulumi.String("My issue"),
Body: pulumi.String("My issue body"),
Labels: pulumi.StringArray{
pulumi.String("bug"),
pulumi.String("documentation"),
},
Assignees: pulumi.StringArray{
pulumi.String("bob-github"),
},
MilestoneNumber: testRepositoryMilestone.Number,
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.RepositoryMilestone;
import com.pulumi.github.RepositoryMilestoneArgs;
import com.pulumi.github.Issue;
import com.pulumi.github.IssueArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Create an issue with milestone and project assignment
var test = new Repository("test", RepositoryArgs.builder()
.name("tf-acc-test-%s")
.autoInit(true)
.hasIssues(true)
.build());
var testRepositoryMilestone = new RepositoryMilestone("testRepositoryMilestone", RepositoryMilestoneArgs.builder()
.owner(StdFunctions.split().applyValue(invoke -> invoke.result()[0]))
.repository(test.name())
.title("v1.0.0")
.description("General Availability")
.dueDate("2022-11-22")
.state("open")
.build());
var testIssue = new Issue("testIssue", IssueArgs.builder()
.repository(test.name())
.title("My issue")
.body("My issue body")
.labels(
"bug",
"documentation")
.assignees("bob-github")
.milestoneNumber(testRepositoryMilestone.number())
.build());
}
}
resources:
# Create an issue with milestone and project assignment
test:
type: github:Repository
properties:
name: tf-acc-test-%s
autoInit: true
hasIssues: true
testRepositoryMilestone:
type: github:RepositoryMilestone
name: test
properties:
owner:
fn::invoke:
function: std:split
arguments:
separator: /
text: ${test.fullName}
return: result[0]
repository: ${test.name}
title: v1.0.0
description: General Availability
dueDate: 2022-11-22
state: open
testIssue:
type: github:Issue
name: test
properties:
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.

$ pulumi import github:index/issue:Issue issue_15 myrepo:15

Constructors

Link copied to clipboard
constructor(assignees: Output<List<String>>? = null, body: Output<String>? = null, labels: Output<List<String>>? = null, milestoneNumber: Output<Int>? = null, repository: Output<String>? = null, title: Output<String>? = null)

Properties

Link copied to clipboard
val assignees: Output<List<String>>? = null

List of Logins to assign the to the issue

Link copied to clipboard
val body: Output<String>? = null

Body of the issue

Link copied to clipboard
val labels: Output<List<String>>? = null

List of labels to attach to the issue

Link copied to clipboard
val milestoneNumber: Output<Int>? = null

Milestone number to assign to the issue

Link copied to clipboard
val repository: Output<String>? = null

The GitHub repository name

Link copied to clipboard
val title: Output<String>? = null

Title of the issue

Functions

Link copied to clipboard
open override fun toJava(): IssueArgs