1. Packages
  2. Github Provider
  3. API Docs
  4. getCollaborators
GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi

github.getCollaborators

Explore with Pulumi AI

github logo
GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi

    Use this data source to retrieve the collaborators for a given repository.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const test = github.getCollaborators({
        owner: "example_owner",
        repository: "example_repository",
    });
    
    import pulumi
    import pulumi_github as github
    
    test = github.get_collaborators(owner="example_owner",
        repository="example_repository")
    
    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.GetCollaborators(ctx, &github.GetCollaboratorsArgs{
    			Owner:      "example_owner",
    			Repository: "example_repository",
    		}, 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 test = Github.GetCollaborators.Invoke(new()
        {
            Owner = "example_owner",
            Repository = "example_repository",
        });
    
    });
    
    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.GetCollaboratorsArgs;
    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 test = GithubFunctions.getCollaborators(GetCollaboratorsArgs.builder()
                .owner("example_owner")
                .repository("example_repository")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: github:getCollaborators
          Arguments:
            owner: example_owner
            repository: example_repository
    

    Using getCollaborators

    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 getCollaborators(args: GetCollaboratorsArgs, opts?: InvokeOptions): Promise<GetCollaboratorsResult>
    function getCollaboratorsOutput(args: GetCollaboratorsOutputArgs, opts?: InvokeOptions): Output<GetCollaboratorsResult>
    def get_collaborators(affiliation: Optional[str] = None,
                          owner: Optional[str] = None,
                          permission: Optional[str] = None,
                          repository: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCollaboratorsResult
    def get_collaborators_output(affiliation: Optional[pulumi.Input[str]] = None,
                          owner: Optional[pulumi.Input[str]] = None,
                          permission: Optional[pulumi.Input[str]] = None,
                          repository: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetCollaboratorsResult]
    func GetCollaborators(ctx *Context, args *GetCollaboratorsArgs, opts ...InvokeOption) (*GetCollaboratorsResult, error)
    func GetCollaboratorsOutput(ctx *Context, args *GetCollaboratorsOutputArgs, opts ...InvokeOption) GetCollaboratorsResultOutput

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

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

    The following arguments are supported:

    Owner string
    The organization that owns the repository.
    Repository string
    The name of the repository.
    Affiliation string
    Filter collaborators returned by their affiliation. Can be one of: outside, direct, all. Defaults to all.
    Permission string
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    Owner string
    The organization that owns the repository.
    Repository string
    The name of the repository.
    Affiliation string
    Filter collaborators returned by their affiliation. Can be one of: outside, direct, all. Defaults to all.
    Permission string
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    owner String
    The organization that owns the repository.
    repository String
    The name of the repository.
    affiliation String
    Filter collaborators returned by their affiliation. Can be one of: outside, direct, all. Defaults to all.
    permission String
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    owner string
    The organization that owns the repository.
    repository string
    The name of the repository.
    affiliation string
    Filter collaborators returned by their affiliation. Can be one of: outside, direct, all. Defaults to all.
    permission string
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    owner str
    The organization that owns the repository.
    repository str
    The name of the repository.
    affiliation str
    Filter collaborators returned by their affiliation. Can be one of: outside, direct, all. Defaults to all.
    permission str
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    owner String
    The organization that owns the repository.
    repository String
    The name of the repository.
    affiliation String
    Filter collaborators returned by their affiliation. Can be one of: outside, direct, all. Defaults to all.
    permission String
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.

    getCollaborators Result

    The following output properties are available:

    Collaborators List<GetCollaboratorsCollaborator>
    An Array of GitHub collaborators. Each collaborator block consists of the fields documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Owner string
    Repository string
    Affiliation string
    Permission string
    The permission of the collaborator.
    Collaborators []GetCollaboratorsCollaborator
    An Array of GitHub collaborators. Each collaborator block consists of the fields documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Owner string
    Repository string
    Affiliation string
    Permission string
    The permission of the collaborator.
    collaborators List<GetCollaboratorsCollaborator>
    An Array of GitHub collaborators. Each collaborator block consists of the fields documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    owner String
    repository String
    affiliation String
    permission String
    The permission of the collaborator.
    collaborators GetCollaboratorsCollaborator[]
    An Array of GitHub collaborators. Each collaborator block consists of the fields documented below.
    id string
    The provider-assigned unique ID for this managed resource.
    owner string
    repository string
    affiliation string
    permission string
    The permission of the collaborator.
    collaborators Sequence[GetCollaboratorsCollaborator]
    An Array of GitHub collaborators. Each collaborator block consists of the fields documented below.
    id str
    The provider-assigned unique ID for this managed resource.
    owner str
    repository str
    affiliation str
    permission str
    The permission of the collaborator.
    collaborators List<Property Map>
    An Array of GitHub collaborators. Each collaborator block consists of the fields documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    owner String
    repository String
    affiliation String
    permission String
    The permission of the collaborator.

    Supporting Types

    GetCollaboratorsCollaborator

    EventsUrl string
    The GitHub API URL for the collaborator's events.
    FollowersUrl string
    The GitHub API URL for the collaborator's followers.
    FollowingUrl string
    The GitHub API URL for those following the collaborator.
    GistsUrl string
    The GitHub API URL for the collaborator's gists.
    HtmlUrl string
    The GitHub HTML URL for the collaborator.
    Id int
    The ID of the collaborator.
    Login string
    The collaborator's login.
    OrganizationsUrl string
    The GitHub API URL for the collaborator's organizations.
    Permission string
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    ReceivedEventsUrl string
    The GitHub API URL for the collaborator's received events.
    ReposUrl string
    The GitHub API URL for the collaborator's repositories.
    SiteAdmin bool
    Whether the user is a GitHub admin.
    StarredUrl string
    The GitHub API URL for the collaborator's starred repositories.
    SubscriptionsUrl string
    The GitHub API URL for the collaborator's subscribed repositories.
    Type string
    The type of the collaborator (ex. user).
    Url string
    The GitHub API URL for the collaborator.
    EventsUrl string
    The GitHub API URL for the collaborator's events.
    FollowersUrl string
    The GitHub API URL for the collaborator's followers.
    FollowingUrl string
    The GitHub API URL for those following the collaborator.
    GistsUrl string
    The GitHub API URL for the collaborator's gists.
    HtmlUrl string
    The GitHub HTML URL for the collaborator.
    Id int
    The ID of the collaborator.
    Login string
    The collaborator's login.
    OrganizationsUrl string
    The GitHub API URL for the collaborator's organizations.
    Permission string
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    ReceivedEventsUrl string
    The GitHub API URL for the collaborator's received events.
    ReposUrl string
    The GitHub API URL for the collaborator's repositories.
    SiteAdmin bool
    Whether the user is a GitHub admin.
    StarredUrl string
    The GitHub API URL for the collaborator's starred repositories.
    SubscriptionsUrl string
    The GitHub API URL for the collaborator's subscribed repositories.
    Type string
    The type of the collaborator (ex. user).
    Url string
    The GitHub API URL for the collaborator.
    eventsUrl String
    The GitHub API URL for the collaborator's events.
    followersUrl String
    The GitHub API URL for the collaborator's followers.
    followingUrl String
    The GitHub API URL for those following the collaborator.
    gistsUrl String
    The GitHub API URL for the collaborator's gists.
    htmlUrl String
    The GitHub HTML URL for the collaborator.
    id Integer
    The ID of the collaborator.
    login String
    The collaborator's login.
    organizationsUrl String
    The GitHub API URL for the collaborator's organizations.
    permission String
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    receivedEventsUrl String
    The GitHub API URL for the collaborator's received events.
    reposUrl String
    The GitHub API URL for the collaborator's repositories.
    siteAdmin Boolean
    Whether the user is a GitHub admin.
    starredUrl String
    The GitHub API URL for the collaborator's starred repositories.
    subscriptionsUrl String
    The GitHub API URL for the collaborator's subscribed repositories.
    type String
    The type of the collaborator (ex. user).
    url String
    The GitHub API URL for the collaborator.
    eventsUrl string
    The GitHub API URL for the collaborator's events.
    followersUrl string
    The GitHub API URL for the collaborator's followers.
    followingUrl string
    The GitHub API URL for those following the collaborator.
    gistsUrl string
    The GitHub API URL for the collaborator's gists.
    htmlUrl string
    The GitHub HTML URL for the collaborator.
    id number
    The ID of the collaborator.
    login string
    The collaborator's login.
    organizationsUrl string
    The GitHub API URL for the collaborator's organizations.
    permission string
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    receivedEventsUrl string
    The GitHub API URL for the collaborator's received events.
    reposUrl string
    The GitHub API URL for the collaborator's repositories.
    siteAdmin boolean
    Whether the user is a GitHub admin.
    starredUrl string
    The GitHub API URL for the collaborator's starred repositories.
    subscriptionsUrl string
    The GitHub API URL for the collaborator's subscribed repositories.
    type string
    The type of the collaborator (ex. user).
    url string
    The GitHub API URL for the collaborator.
    events_url str
    The GitHub API URL for the collaborator's events.
    followers_url str
    The GitHub API URL for the collaborator's followers.
    following_url str
    The GitHub API URL for those following the collaborator.
    gists_url str
    The GitHub API URL for the collaborator's gists.
    html_url str
    The GitHub HTML URL for the collaborator.
    id int
    The ID of the collaborator.
    login str
    The collaborator's login.
    organizations_url str
    The GitHub API URL for the collaborator's organizations.
    permission str
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    received_events_url str
    The GitHub API URL for the collaborator's received events.
    repos_url str
    The GitHub API URL for the collaborator's repositories.
    site_admin bool
    Whether the user is a GitHub admin.
    starred_url str
    The GitHub API URL for the collaborator's starred repositories.
    subscriptions_url str
    The GitHub API URL for the collaborator's subscribed repositories.
    type str
    The type of the collaborator (ex. user).
    url str
    The GitHub API URL for the collaborator.
    eventsUrl String
    The GitHub API URL for the collaborator's events.
    followersUrl String
    The GitHub API URL for the collaborator's followers.
    followingUrl String
    The GitHub API URL for those following the collaborator.
    gistsUrl String
    The GitHub API URL for the collaborator's gists.
    htmlUrl String
    The GitHub HTML URL for the collaborator.
    id Number
    The ID of the collaborator.
    login String
    The collaborator's login.
    organizationsUrl String
    The GitHub API URL for the collaborator's organizations.
    permission String
    Filter collaborators returned by their permission. Can be one of: pull, triage, push, maintain, admin. Defaults to not doing any filtering on permission.
    receivedEventsUrl String
    The GitHub API URL for the collaborator's received events.
    reposUrl String
    The GitHub API URL for the collaborator's repositories.
    siteAdmin Boolean
    Whether the user is a GitHub admin.
    starredUrl String
    The GitHub API URL for the collaborator's starred repositories.
    subscriptionsUrl String
    The GitHub API URL for the collaborator's subscribed repositories.
    type String
    The type of the collaborator (ex. user).
    url String
    The GitHub API URL for the collaborator.

    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.3.2 published on Friday, Oct 11, 2024 by Pulumi