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",
});
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)
public static Output<GetCollaboratorsResult> getCollaborators(GetCollaboratorsArgs args, InvokeOptions options)
fn::invoke:
function: github:index/getCollaborators:getCollaborators
arguments:
# arguments dictionary
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 toall
. - 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 toall
. - 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 toall
. - 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 toall
. - 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 toall
. - 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 toall
. - 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<Get
Collaborators Collaborator> - 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
[]Get
Collaborators Collaborator - 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<Get
Collaborators Collaborator> - 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
Get
Collaborators Collaborator[] - 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[Get
Collaborators Collaborator] - 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
- Events
Url This property is required. string - The GitHub API URL for the collaborator's events.
- Followers
Url This property is required. string - The GitHub API URL for the collaborator's followers.
- Following
Url This property is required. string - The GitHub API URL for those following the collaborator.
- Gists
Url This property is required. string - The GitHub API URL for the collaborator's gists.
- Html
Url 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.
- Organizations
Url 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. - Received
Events Url This property is required. string - The GitHub API URL for the collaborator's received events.
- Repos
Url This property is required. string - 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. string - The GitHub API URL for the collaborator's starred repositories.
- Subscriptions
Url 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. string - The GitHub API URL for the collaborator's events.
- Followers
Url This property is required. string - The GitHub API URL for the collaborator's followers.
- Following
Url This property is required. string - The GitHub API URL for those following the collaborator.
- Gists
Url This property is required. string - The GitHub API URL for the collaborator's gists.
- Html
Url 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.
- Organizations
Url 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. - Received
Events Url This property is required. string - The GitHub API URL for the collaborator's received events.
- Repos
Url This property is required. string - 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. string - The GitHub API URL for the collaborator's starred repositories.
- Subscriptions
Url 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. String - The GitHub API URL for the collaborator's events.
- followers
Url This property is required. String - The GitHub API URL for the collaborator's followers.
- following
Url This property is required. String - The GitHub API URL for those following the collaborator.
- gists
Url This property is required. String - The GitHub API URL for the collaborator's gists.
- html
Url 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.
- organizations
Url 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. - received
Events Url This property is required. String - The GitHub API URL for the collaborator's received events.
- repos
Url This property is required. String - The GitHub API URL for the collaborator's repositories.
- site
Admin This property is required. Boolean - Whether the user is a GitHub admin.
- starred
Url This property is required. String - The GitHub API URL for the collaborator's starred repositories.
- subscriptions
Url 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. string - The GitHub API URL for the collaborator's events.
- followers
Url This property is required. string - The GitHub API URL for the collaborator's followers.
- following
Url This property is required. string - The GitHub API URL for those following the collaborator.
- gists
Url This property is required. string - The GitHub API URL for the collaborator's gists.
- html
Url 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.
- organizations
Url 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. - received
Events Url This property is required. string - The GitHub API URL for the collaborator's received events.
- repos
Url This property is required. string - The GitHub API URL for the collaborator's repositories.
- site
Admin This property is required. boolean - Whether the user is a GitHub admin.
- starred
Url This property is required. string - The GitHub API URL for the collaborator's starred repositories.
- subscriptions
Url 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.
- events
Url This property is required. String - The GitHub API URL for the collaborator's events.
- followers
Url This property is required. String - The GitHub API URL for the collaborator's followers.
- following
Url This property is required. String - The GitHub API URL for those following the collaborator.
- gists
Url This property is required. String - The GitHub API URL for the collaborator's gists.
- html
Url 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.
- organizations
Url 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. - received
Events Url This property is required. String - The GitHub API URL for the collaborator's received events.
- repos
Url This property is required. String - The GitHub API URL for the collaborator's repositories.
- site
Admin This property is required. Boolean - Whether the user is a GitHub admin.
- starred
Url This property is required. String - The GitHub API URL for the collaborator's starred repositories.
- subscriptions
Url 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.