IssueLabels

class IssueLabels : KotlinCustomResource

Provides GitHub issue labels resource. This resource allows you to create and manage issue labels within your GitHub organization.

Note: github.IssueLabels cannot be used in conjunction with github.IssueLabel or they will fight over what your policy should be. This resource is authoritative. For adding a label to a repo in a non-authoritative manner, use github.IssueLabel instead. If you change the case of a label's name, its' color, or description, this resource will edit the existing label to match the new values. However, if you change the name of a label, this resource will create a new label with the new name and delete the old label. Beware that this will remove the label from any issues it was previously attached to.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
// Create a new, red colored label
const testRepo = new github.IssueLabels("test_repo", {
repository: "test-repo",
labels: [
{
name: "Urgent",
color: "FF0000",
},
{
name: "Critical",
color: "FF0000",
},
],
});
import pulumi
import pulumi_github as github
# Create a new, red colored label
test_repo = github.IssueLabels("test_repo",
repository="test-repo",
labels=[
{
"name": "Urgent",
"color": "FF0000",
},
{
"name": "Critical",
"color": "FF0000",
},
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
// Create a new, red colored label
var testRepo = new Github.IssueLabels("test_repo", new()
{
Repository = "test-repo",
Labels = new[]
{
new Github.Inputs.IssueLabelsLabelArgs
{
Name = "Urgent",
Color = "FF0000",
},
new Github.Inputs.IssueLabelsLabelArgs
{
Name = "Critical",
Color = "FF0000",
},
},
});
});
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 new, red colored label
_, err := github.NewIssueLabels(ctx, "test_repo", &github.IssueLabelsArgs{
Repository: pulumi.String("test-repo"),
Labels: github.IssueLabelsLabelArray{
&github.IssueLabelsLabelArgs{
Name: pulumi.String("Urgent"),
Color: pulumi.String("FF0000"),
},
&github.IssueLabelsLabelArgs{
Name: pulumi.String("Critical"),
Color: pulumi.String("FF0000"),
},
},
})
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.IssueLabels;
import com.pulumi.github.IssueLabelsArgs;
import com.pulumi.github.inputs.IssueLabelsLabelArgs;
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 new, red colored label
var testRepo = new IssueLabels("testRepo", IssueLabelsArgs.builder()
.repository("test-repo")
.labels(
IssueLabelsLabelArgs.builder()
.name("Urgent")
.color("FF0000")
.build(),
IssueLabelsLabelArgs.builder()
.name("Critical")
.color("FF0000")
.build())
.build());
}
}
resources:
# Create a new, red colored label
testRepo:
type: github:IssueLabels
name: test_repo
properties:
repository: test-repo
labels:
- name: Urgent
color: FF0000
- name: Critical
color: FF0000

Import

GitHub Issue Labels can be imported using the repository name, e.g.

$ pulumi import github:index/issueLabels:IssueLabels test_repo test_repo

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

List of labels

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val repository: Output<String>

The GitHub repository

Link copied to clipboard
val urn: Output<String>