1. Packages
  2. GitHub
  3. API Docs
  4. getRepositoryWebhooks
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

github.getRepositoryWebhooks

Explore with Pulumi AI

github logo
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

    Use this data source to retrieve webhooks for a given repository.

    Example Usage

    To retrieve webhooks of a repository:

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const repo = github.getRepositoryWebhooks({
        repository: "foo",
    });
    
    import pulumi
    import pulumi_github as github
    
    repo = github.get_repository_webhooks(repository="foo")
    
    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 {
    		_, err := github.GetRepositoryWebhooks(ctx, &github.GetRepositoryWebhooksArgs{
    			Repository: "foo",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var repo = Github.GetRepositoryWebhooks.Invoke(new()
        {
            Repository = "foo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.GithubFunctions;
    import com.pulumi.github.inputs.GetRepositoryWebhooksArgs;
    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) {
            final var repo = GithubFunctions.getRepositoryWebhooks(GetRepositoryWebhooksArgs.builder()
                .repository("foo")
                .build());
    
        }
    }
    
    variables:
      repo:
        fn::invoke:
          Function: github:getRepositoryWebhooks
          Arguments:
            repository: foo
    

    Using getRepositoryWebhooks

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getRepositoryWebhooks(args: GetRepositoryWebhooksArgs, opts?: InvokeOptions): Promise<GetRepositoryWebhooksResult>
    function getRepositoryWebhooksOutput(args: GetRepositoryWebhooksOutputArgs, opts?: InvokeOptions): Output<GetRepositoryWebhooksResult>
    def get_repository_webhooks(repository: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetRepositoryWebhooksResult
    def get_repository_webhooks_output(repository: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryWebhooksResult]
    func GetRepositoryWebhooks(ctx *Context, args *GetRepositoryWebhooksArgs, opts ...InvokeOption) (*GetRepositoryWebhooksResult, error)
    func GetRepositoryWebhooksOutput(ctx *Context, args *GetRepositoryWebhooksOutputArgs, opts ...InvokeOption) GetRepositoryWebhooksResultOutput

    > Note: This function is named GetRepositoryWebhooks in the Go SDK.

    public static class GetRepositoryWebhooks 
    {
        public static Task<GetRepositoryWebhooksResult> InvokeAsync(GetRepositoryWebhooksArgs args, InvokeOptions? opts = null)
        public static Output<GetRepositoryWebhooksResult> Invoke(GetRepositoryWebhooksInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRepositoryWebhooksResult> getRepositoryWebhooks(GetRepositoryWebhooksArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: github:index/getRepositoryWebhooks:getRepositoryWebhooks
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Repository string
    Repository string
    repository String
    repository string
    repository String

    getRepositoryWebhooks Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Repository string
    Webhooks List<GetRepositoryWebhooksWebhook>
    An Array of GitHub Webhooks. Each webhook block consists of the fields documented below.


    Id string
    The provider-assigned unique ID for this managed resource.
    Repository string
    Webhooks []GetRepositoryWebhooksWebhook
    An Array of GitHub Webhooks. Each webhook block consists of the fields documented below.


    id String
    The provider-assigned unique ID for this managed resource.
    repository String
    webhooks List<GetRepositoryWebhooksWebhook>
    An Array of GitHub Webhooks. Each webhook block consists of the fields documented below.


    id string
    The provider-assigned unique ID for this managed resource.
    repository string
    webhooks GetRepositoryWebhooksWebhook[]
    An Array of GitHub Webhooks. Each webhook block consists of the fields documented below.


    id str
    The provider-assigned unique ID for this managed resource.
    repository str
    webhooks Sequence[GetRepositoryWebhooksWebhook]
    An Array of GitHub Webhooks. Each webhook block consists of the fields documented below.


    id String
    The provider-assigned unique ID for this managed resource.
    repository String
    webhooks List<Property Map>
    An Array of GitHub Webhooks. Each webhook block consists of the fields documented below.


    Supporting Types

    GetRepositoryWebhooksWebhook

    Active bool
    true if the webhook is active.
    Id int
    the ID of the webhook.
    Name string
    the name of the webhook.
    Type string
    the type of the webhook.
    Url string
    the url of the webhook.
    Active bool
    true if the webhook is active.
    Id int
    the ID of the webhook.
    Name string
    the name of the webhook.
    Type string
    the type of the webhook.
    Url string
    the url of the webhook.
    active Boolean
    true if the webhook is active.
    id Integer
    the ID of the webhook.
    name String
    the name of the webhook.
    type String
    the type of the webhook.
    url String
    the url of the webhook.
    active boolean
    true if the webhook is active.
    id number
    the ID of the webhook.
    name string
    the name of the webhook.
    type string
    the type of the webhook.
    url string
    the url of the webhook.
    active bool
    true if the webhook is active.
    id int
    the ID of the webhook.
    name str
    the name of the webhook.
    type str
    the type of the webhook.
    url str
    the url of the webhook.
    active Boolean
    true if the webhook is active.
    id Number
    the ID of the webhook.
    name String
    the name of the webhook.
    type String
    the type of the webhook.
    url String
    the url of the webhook.

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi