RepositoryWebhook

class RepositoryWebhook : KotlinCustomResource

This resource allows you to create and manage webhooks for repositories within your GitHub organization or personal account.

Example Usage

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.RepositoryWebhook;
import com.pulumi.github.RepositoryWebhookArgs;
import com.pulumi.github.inputs.RepositoryWebhookConfigurationArgs;
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()
.description("Terraform acceptance tests")
.homepageUrl("http://example.com/")
.visibility("public")
.build());
var foo = new RepositoryWebhook("foo", RepositoryWebhookArgs.builder()
.repository(repo.name())
.configuration(RepositoryWebhookConfigurationArgs.builder()
.url("https://google.de/")
.contentType("form")
.insecureSsl(false)
.build())
.active(false)
.events("issues")
.build());
}
}

Import

Repository webhooks can be imported using the name of the repository, combined with the id of the webhook, separated by a / character. The id of the webhook can be found in the URL of the webhook. For example"https://github.com/foo-org/foo-repo/settings/hooks/14711452". Importing uses the name of the repository, as well as the ID of the webhook, e.g.

$ pulumi import github:index/repositoryWebhook:RepositoryWebhook terraform terraform/11235813

If secret is populated in the webhook's configuration, the value will be imported as "********".

Properties

Link copied to clipboard
val active: Output<Boolean>?

Indicate if the webhook should receive events. Defaults to true.

Link copied to clipboard

Configuration block for the webhook. Detailed below.

Link copied to clipboard
val etag: Output<String>
Link copied to clipboard
val events: Output<List<String>>

A list of events which should trigger the webhook. See a list of available events.

Link copied to clipboard
val id: Output<String>
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 webhook.

Link copied to clipboard
val url: Output<String>

The URL of the webhook.

Link copied to clipboard
val urn: Output<String>