IssueLabelArgs

data class IssueLabelArgs(val color: Output<String>? = null, val description: Output<String>? = null, val name: Output<String>? = null, val repository: Output<String>? = null) : ConvertibleToJava<IssueLabelArgs>

Provides a GitHub issue label resource. This resource allows you to create and manage issue labels within your GitHub organization. Issue labels are keyed off of their "name", so pre-existing issue labels result in a 422 HTTP error if they exist outside of Pulumi. Normally this would not be an issue, except new repositories are created with a "default" set of labels, and those labels easily conflict with custom ones. This resource will first check if the label exists, and then issue an update, otherwise it will create.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
// Create a new, red colored label
const testRepo = new github.IssueLabel("test_repo", {
repository: "test-repo",
name: "Urgent",
color: "FF0000",
});
import pulumi
import pulumi_github as github
# Create a new, red colored label
test_repo = github.IssueLabel("test_repo",
repository="test-repo",
name="Urgent",
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.IssueLabel("test_repo", new()
{
Repository = "test-repo",
Name = "Urgent",
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.NewIssueLabel(ctx, "test_repo", &github.IssueLabelArgs{
Repository: pulumi.String("test-repo"),
Name: pulumi.String("Urgent"),
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.IssueLabel;
import com.pulumi.github.IssueLabelArgs;
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 IssueLabel("testRepo", IssueLabelArgs.builder()
.repository("test-repo")
.name("Urgent")
.color("FF0000")
.build());
}
}
resources:
# Create a new, red colored label
testRepo:
type: github:IssueLabel
name: test_repo
properties:
repository: test-repo
name: Urgent
color: FF0000

Import

GitHub Issue Labels can be imported using an ID made up of repository:name, e.g.

$ pulumi import github:index/issueLabel:IssueLabel panic_label terraform:panic

Constructors

Link copied to clipboard
constructor(color: Output<String>? = null, description: Output<String>? = null, name: Output<String>? = null, repository: Output<String>? = null)

Properties

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

A 6 character hex code, without the leading #, identifying the color of the label.

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

A short description of the label.

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

The name of the label.

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

The GitHub repository

Functions

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