RepositoryAutolinkReference

class RepositoryAutolinkReference : KotlinCustomResource

This resource allows you to create and manage an autolink reference for a single repository.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const repo = new github.Repository("repo", {
name: "my-repo",
description: "GitHub repo managed by Terraform",
"private": false,
});
const autolink = new github.RepositoryAutolinkReference("autolink", {
repository: repo.name,
keyPrefix: "TICKET-",
targetUrlTemplate: "https://example.com/TICKET?query=<num>",
});
import pulumi
import pulumi_github as github
repo = github.Repository("repo",
name="my-repo",
description="GitHub repo managed by Terraform",
private=False)
autolink = github.RepositoryAutolinkReference("autolink",
repository=repo.name,
key_prefix="TICKET-",
target_url_template="https://example.com/TICKET?query=<num>")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var repo = new Github.Repository("repo", new()
{
Name = "my-repo",
Description = "GitHub repo managed by Terraform",
Private = false,
});
var autolink = new Github.RepositoryAutolinkReference("autolink", new()
{
Repository = repo.Name,
KeyPrefix = "TICKET-",
TargetUrlTemplate = "https://example.com/TICKET?query=<num>",
});
});
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 {
repo, err := github.NewRepository(ctx, "repo", &github.RepositoryArgs{
Name: pulumi.String("my-repo"),
Description: pulumi.String("GitHub repo managed by Terraform"),
Private: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = github.NewRepositoryAutolinkReference(ctx, "autolink", &github.RepositoryAutolinkReferenceArgs{
Repository: repo.Name,
KeyPrefix: pulumi.String("TICKET-"),
TargetUrlTemplate: pulumi.String("https://example.com/TICKET?query=<num>"),
})
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.RepositoryAutolinkReference;
import com.pulumi.github.RepositoryAutolinkReferenceArgs;
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) {
var repo = new Repository("repo", RepositoryArgs.builder()
.name("my-repo")
.description("GitHub repo managed by Terraform")
.private_(false)
.build());
var autolink = new RepositoryAutolinkReference("autolink", RepositoryAutolinkReferenceArgs.builder()
.repository(repo.name())
.keyPrefix("TICKET-")
.targetUrlTemplate("https://example.com/TICKET?query=<num>")
.build());
}
}
resources:
repo:
type: github:Repository
properties:
name: my-repo
description: GitHub repo managed by Terraform
private: false
autolink:
type: github:RepositoryAutolinkReference
properties:
repository: ${repo.name}
keyPrefix: TICKET-
targetUrlTemplate: https://example.com/TICKET?query=<num>

Import

Import by key prefix

$ pulumi import github:index/repositoryAutolinkReference:RepositoryAutolinkReference auto oof/OOF-

Properties

Link copied to clipboard
val etag: Output<String>

An etag representing the autolink reference object.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val isAlphanumeric: Output<Boolean>?

Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. Default is true.

Link copied to clipboard
val keyPrefix: Output<String>

This prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit.

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 repository of the autolink reference.

Link copied to clipboard

The template of the target URL used for the links; must be a valid URL and contain <num> for the reference number

Link copied to clipboard
val urn: Output<String>