getRepositoryPullRequests

Use this data source to retrieve information about multiple GitHub Pull Requests 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.GetRepositoryPullRequestsArgs;
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.getRepositoryPullRequests(GetRepositoryPullRequestsArgs.builder()
.baseRef("main")
.baseRepository("example-repository")
.sortBy("updated")
.sortDirection("desc")
.state("open")
.build());
}
}

Return

A collection of values returned by getRepositoryPullRequests.

Parameters

argument

A collection of arguments for invoking getRepositoryPullRequests.


suspend fun getRepositoryPullRequests(baseRef: String? = null, baseRepository: String, headRef: String? = null, owner: String? = null, sortBy: String? = null, sortDirection: String? = null, state: String? = null): GetRepositoryPullRequestsInvokeResult

Return

A collection of values returned by getRepositoryPullRequests.

Parameters

baseRef

If set, filters Pull Requests by base branch name.

baseRepository

Name of the base repository to retrieve the Pull Requests from.

headRef

If set, filters Pull Requests by head user or head organization and branch name in the format of "user:ref-name" or "organization:ref-name". For example: "github:new-script-format" or "octocat:test-branch".

owner

Owner of the repository. If not provided, the provider's default owner is used.

sortBy

If set, indicates what to sort results by. Can be either "created", "updated", "popularity" (comment count) or "long-running" (age, filtering by pulls updated in the last month). Default: "created".

sortDirection

If set, controls the direction of the sort. Can be either "asc" or "desc". Default: "asc".

state

If set, filters Pull Requests by state. Can be "open", "closed", or "all". Default: "open".

See also


Return

A collection of values returned by getRepositoryPullRequests.

Parameters

argument

Builder for com.pulumi.github.kotlin.inputs.GetRepositoryPullRequestsPlainArgs.

See also