get Repository Branches
suspend fun getRepositoryBranches(argument: GetRepositoryBranchesPlainArgs): GetRepositoryBranchesResult
Use this data source to retrieve information about branches in a repository.
Example Usage
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.GetRepositoryBranchesArgs;
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 example = GithubFunctions.getRepositoryBranches(GetRepositoryBranchesArgs.builder()
.repository("example-repository")
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getRepositoryBranches.
Parameters
argument
A collection of arguments for invoking getRepositoryBranches.
suspend fun getRepositoryBranches(onlyNonProtectedBranches: Boolean? = null, onlyProtectedBranches: Boolean? = null, repository: String): GetRepositoryBranchesResult
Return
A collection of values returned by getRepositoryBranches.
Parameters
only Non Protected Branches
. If true, the branches
attributes will be populated only with non protected branches. Default: false
.
only Protected Branches
. If true, the branches
attributes will be populated only with protected branches. Default: false
.
repository
Name of the repository to retrieve the branches from.
See also
suspend fun getRepositoryBranches(argument: suspend GetRepositoryBranchesPlainArgsBuilder.() -> Unit): GetRepositoryBranchesResult
Return
A collection of values returned by getRepositoryBranches.
Parameters
argument
Builder for com.pulumi.github.kotlin.inputs.GetRepositoryBranchesPlainArgs.