1. Packages
  2. Github Provider
  3. API Docs
  4. getCollaborators
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

github.getCollaborators

Explore with Pulumi AI

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",
});
Copy
import pulumi
import pulumi_github as github

test = github.get_collaborators(owner="example_owner",
    repository="example_repository")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: github:getCollaborators
      arguments:
        owner: example_owner
        repository: example_repository
Copy

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>
Copy
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]
Copy
func GetCollaborators(ctx *Context, args *GetCollaboratorsArgs, opts ...InvokeOption) (*GetCollaboratorsResult, error)
func GetCollaboratorsOutput(ctx *Context, args *GetCollaboratorsOutputArgs, opts ...InvokeOption) GetCollaboratorsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetCollaboratorsResult> getCollaborators(GetCollaboratorsArgs args, InvokeOptions options)
public static Output<GetCollaboratorsResult> getCollaborators(GetCollaboratorsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: github:index/getCollaborators:getCollaborators
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Owner This property is required. string
The organization that owns the repository.
Repository This property is required. 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 This property is required. string
The organization that owns the repository.
Repository This property is required. 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 This property is required. String
The organization that owns the repository.
repository This property is required. 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 This property is required. string
The organization that owns the repository.
repository This property is required. 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 This property is required. str
The organization that owns the repository.
repository This property is required. 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 This property is required. String
The organization that owns the repository.
repository This property is required. 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 This property is required. string
The GitHub API URL for the collaborator's events.
FollowersUrl This property is required. string
The GitHub API URL for the collaborator's followers.
FollowingUrl This property is required. string
The GitHub API URL for those following the collaborator.
GistsUrl This property is required. string
The GitHub API URL for the collaborator's gists.
HtmlUrl This property is required. string
The GitHub HTML URL for the collaborator.
Id This property is required. int
The ID of the collaborator.
Login This property is required. string
The collaborator's login.
OrganizationsUrl This property is required. string
The GitHub API URL for the collaborator's organizations.
Permission This property is required. 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 This property is required. string
The GitHub API URL for the collaborator's received events.
ReposUrl This property is required. string
The GitHub API URL for the collaborator's repositories.
SiteAdmin This property is required. bool
Whether the user is a GitHub admin.
StarredUrl This property is required. string
The GitHub API URL for the collaborator's starred repositories.
SubscriptionsUrl This property is required. string
The GitHub API URL for the collaborator's subscribed repositories.
Type This property is required. string
The type of the collaborator (ex. user).
Url This property is required. string
The GitHub API URL for the collaborator.
EventsUrl This property is required. string
The GitHub API URL for the collaborator's events.
FollowersUrl This property is required. string
The GitHub API URL for the collaborator's followers.
FollowingUrl This property is required. string
The GitHub API URL for those following the collaborator.
GistsUrl This property is required. string
The GitHub API URL for the collaborator's gists.
HtmlUrl This property is required. string
The GitHub HTML URL for the collaborator.
Id This property is required. int
The ID of the collaborator.
Login This property is required. string
The collaborator's login.
OrganizationsUrl This property is required. string
The GitHub API URL for the collaborator's organizations.
Permission This property is required. 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 This property is required. string
The GitHub API URL for the collaborator's received events.
ReposUrl This property is required. string
The GitHub API URL for the collaborator's repositories.
SiteAdmin This property is required. bool
Whether the user is a GitHub admin.
StarredUrl This property is required. string
The GitHub API URL for the collaborator's starred repositories.
SubscriptionsUrl This property is required. string
The GitHub API URL for the collaborator's subscribed repositories.
Type This property is required. string
The type of the collaborator (ex. user).
Url This property is required. string
The GitHub API URL for the collaborator.
eventsUrl This property is required. String
The GitHub API URL for the collaborator's events.
followersUrl This property is required. String
The GitHub API URL for the collaborator's followers.
followingUrl This property is required. String
The GitHub API URL for those following the collaborator.
gistsUrl This property is required. String
The GitHub API URL for the collaborator's gists.
htmlUrl This property is required. String
The GitHub HTML URL for the collaborator.
id This property is required. Integer
The ID of the collaborator.
login This property is required. String
The collaborator's login.
organizationsUrl This property is required. String
The GitHub API URL for the collaborator's organizations.
permission This property is required. 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 This property is required. String
The GitHub API URL for the collaborator's received events.
reposUrl This property is required. String
The GitHub API URL for the collaborator's repositories.
siteAdmin This property is required. Boolean
Whether the user is a GitHub admin.
starredUrl This property is required. String
The GitHub API URL for the collaborator's starred repositories.
subscriptionsUrl This property is required. String
The GitHub API URL for the collaborator's subscribed repositories.
type This property is required. String
The type of the collaborator (ex. user).
url This property is required. String
The GitHub API URL for the collaborator.
eventsUrl This property is required. string
The GitHub API URL for the collaborator's events.
followersUrl This property is required. string
The GitHub API URL for the collaborator's followers.
followingUrl This property is required. string
The GitHub API URL for those following the collaborator.
gistsUrl This property is required. string
The GitHub API URL for the collaborator's gists.
htmlUrl This property is required. string
The GitHub HTML URL for the collaborator.
id This property is required. number
The ID of the collaborator.
login This property is required. string
The collaborator's login.
organizationsUrl This property is required. string
The GitHub API URL for the collaborator's organizations.
permission This property is required. 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 This property is required. string
The GitHub API URL for the collaborator's received events.
reposUrl This property is required. string
The GitHub API URL for the collaborator's repositories.
siteAdmin This property is required. boolean
Whether the user is a GitHub admin.
starredUrl This property is required. string
The GitHub API URL for the collaborator's starred repositories.
subscriptionsUrl This property is required. string
The GitHub API URL for the collaborator's subscribed repositories.
type This property is required. string
The type of the collaborator (ex. user).
url This property is required. string
The GitHub API URL for the collaborator.
events_url This property is required. str
The GitHub API URL for the collaborator's events.
followers_url This property is required. str
The GitHub API URL for the collaborator's followers.
following_url This property is required. str
The GitHub API URL for those following the collaborator.
gists_url This property is required. str
The GitHub API URL for the collaborator's gists.
html_url This property is required. str
The GitHub HTML URL for the collaborator.
id This property is required. int
The ID of the collaborator.
login This property is required. str
The collaborator's login.
organizations_url This property is required. str
The GitHub API URL for the collaborator's organizations.
permission This property is required. 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 This property is required. str
The GitHub API URL for the collaborator's received events.
repos_url This property is required. str
The GitHub API URL for the collaborator's repositories.
site_admin This property is required. bool
Whether the user is a GitHub admin.
starred_url This property is required. str
The GitHub API URL for the collaborator's starred repositories.
subscriptions_url This property is required. str
The GitHub API URL for the collaborator's subscribed repositories.
type This property is required. str
The type of the collaborator (ex. user).
url This property is required. str
The GitHub API URL for the collaborator.
eventsUrl This property is required. String
The GitHub API URL for the collaborator's events.
followersUrl This property is required. String
The GitHub API URL for the collaborator's followers.
followingUrl This property is required. String
The GitHub API URL for those following the collaborator.
gistsUrl This property is required. String
The GitHub API URL for the collaborator's gists.
htmlUrl This property is required. String
The GitHub HTML URL for the collaborator.
id This property is required. Number
The ID of the collaborator.
login This property is required. String
The collaborator's login.
organizationsUrl This property is required. String
The GitHub API URL for the collaborator's organizations.
permission This property is required. 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 This property is required. String
The GitHub API URL for the collaborator's received events.
reposUrl This property is required. String
The GitHub API URL for the collaborator's repositories.
siteAdmin This property is required. Boolean
Whether the user is a GitHub admin.
starredUrl This property is required. String
The GitHub API URL for the collaborator's starred repositories.
subscriptionsUrl This property is required. String
The GitHub API URL for the collaborator's subscribed repositories.
type This property is required. String
The type of the collaborator (ex. user).
url This property is required. 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.