github logo
GitHub v5.6.0, Mar 14 23

github.getCollaborators

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

Example Usage

using System.Collections.Generic;
using Pulumi;
using Github = Pulumi.Github;

return await Deployment.RunAsync(() => 
{
    var test = Github.GetCollaborators.Invoke(new()
    {
        Owner = "example_owner",
        Repository = "example_repository",
    });

});
package main

import (
	"github.com/pulumi/pulumi-github/sdk/v5/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
	})
}
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());

    }
}
import pulumi
import pulumi_github as github

test = github.get_collaborators(owner="example_owner",
    repository="example_repository")
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const test = github.getCollaborators({
    owner: "example_owner",
    repository: "example_repository",
});
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,
                      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,
                      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.

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.

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.

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.

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.

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.

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
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
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
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
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
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

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

The permission of the collaborator.

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

The permission of the collaborator.

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

The permission of the collaborator.

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

The permission of the collaborator.

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

The permission of the collaborator.

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

The permission of the collaborator.

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.