get Collaborators
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",
});
Content copied to clipboard
import pulumi
import pulumi_github as github
test = github.get_collaborators(owner="example_owner",
repository="example_repository")
Content copied to clipboard
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
test:
fn::invoke:
function: github:getCollaborators
arguments:
owner: example_owner
repository: example_repository
Content copied to clipboard
Return
A collection of values returned by getCollaborators.
Parameters
argument
A collection of arguments for invoking getCollaborators.
suspend fun getCollaborators(affiliation: String? = null, owner: String, permission: String? = null, repository: String): GetCollaboratorsResult
Return
A collection of values returned by getCollaborators.
Parameters
affiliation
Filter collaborators returned by their affiliation. Can be one of: outside
, direct
, all
. Defaults to all
.
owner
The organization that owns the repository.
permission
Filter collaborators returned by their permission. Can be one of: pull
, triage
, push
, maintain
, admin
. Defaults to not doing any filtering on permission.
repository
The name of the repository.
See also
suspend fun getCollaborators(argument: suspend GetCollaboratorsPlainArgsBuilder.() -> Unit): GetCollaboratorsResult
Return
A collection of values returned by getCollaborators.
Parameters
argument
Builder for com.pulumi.github.kotlin.inputs.GetCollaboratorsPlainArgs.