GitHub v6.3.2 published on Friday, Oct 11, 2024 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)
// 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 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 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 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 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 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 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 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 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 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 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 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 string - The GitHub API URL for the collaborator's events.
- Followers
Url string - The GitHub API URL for the collaborator's followers.
- Following
Url string - The GitHub API URL for those following the collaborator.
- Gists
Url string - The GitHub API URL for the collaborator's gists.
- Html
Url string - The GitHub HTML URL for the collaborator.
- Id int
- The ID of the collaborator.
- Login string
- The collaborator's login.
- Organizations
Url 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. - Received
Events stringUrl - The GitHub API URL for the collaborator's received events.
- Repos
Url string - The GitHub API URL for the collaborator's repositories.
- Site
Admin bool - Whether the user is a GitHub admin.
- Starred
Url string - The GitHub API URL for the collaborator's starred repositories.
- Subscriptions
Url 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 string - The GitHub API URL for the collaborator's events.
- Followers
Url string - The GitHub API URL for the collaborator's followers.
- Following
Url string - The GitHub API URL for those following the collaborator.
- Gists
Url string - The GitHub API URL for the collaborator's gists.
- Html
Url string - The GitHub HTML URL for the collaborator.
- Id int
- The ID of the collaborator.
- Login string
- The collaborator's login.
- Organizations
Url 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. - Received
Events stringUrl - The GitHub API URL for the collaborator's received events.
- Repos
Url string - The GitHub API URL for the collaborator's repositories.
- Site
Admin bool - Whether the user is a GitHub admin.
- Starred
Url string - The GitHub API URL for the collaborator's starred repositories.
- Subscriptions
Url 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 String - The GitHub API URL for the collaborator's events.
- followers
Url String - The GitHub API URL for the collaborator's followers.
- following
Url String - The GitHub API URL for those following the collaborator.
- gists
Url String - The GitHub API URL for the collaborator's gists.
- html
Url String - The GitHub HTML URL for the collaborator.
- id Integer
- The ID of the collaborator.
- login String
- The collaborator's login.
- organizations
Url 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. - received
Events StringUrl - The GitHub API URL for the collaborator's received events.
- repos
Url String - The GitHub API URL for the collaborator's repositories.
- site
Admin Boolean - Whether the user is a GitHub admin.
- starred
Url String - The GitHub API URL for the collaborator's starred repositories.
- subscriptions
Url 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 string - The GitHub API URL for the collaborator's events.
- followers
Url string - The GitHub API URL for the collaborator's followers.
- following
Url string - The GitHub API URL for those following the collaborator.
- gists
Url string - The GitHub API URL for the collaborator's gists.
- html
Url string - The GitHub HTML URL for the collaborator.
- id number
- The ID of the collaborator.
- login string
- The collaborator's login.
- organizations
Url 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. - received
Events stringUrl - The GitHub API URL for the collaborator's received events.
- repos
Url string - The GitHub API URL for the collaborator's repositories.
- site
Admin boolean - Whether the user is a GitHub admin.
- starred
Url string - The GitHub API URL for the collaborator's starred repositories.
- subscriptions
Url 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_ strurl - 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.
- events
Url String - The GitHub API URL for the collaborator's events.
- followers
Url String - The GitHub API URL for the collaborator's followers.
- following
Url String - The GitHub API URL for those following the collaborator.
- gists
Url String - The GitHub API URL for the collaborator's gists.
- html
Url String - The GitHub HTML URL for the collaborator.
- id Number
- The ID of the collaborator.
- login String
- The collaborator's login.
- organizations
Url 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. - received
Events StringUrl - The GitHub API URL for the collaborator's received events.
- repos
Url String - The GitHub API URL for the collaborator's repositories.
- site
Admin Boolean - Whether the user is a GitHub admin.
- starred
Url String - The GitHub API URL for the collaborator's starred repositories.
- subscriptions
Url 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.