pullRequestsAsFlow

fun GithubApi.pullRequestsAsFlow(repositoryName: String, concurrency: Int = 1, filter: PullRequestQuery.() -> Unit = {}): Flow<PullRequest>

Retrieves a flow of all pull requests for the specified GitHub repository, filtered by the given criteria.

Return

A Flow<PullRequest> object representing the pull requests matching the specified filter criteria.

Example usage:

val githubApi = GithubApi("your_api_key_here")
val repositoryName = "owner/repo_name"
val pullRequestsFlow = githubApi.pullRequestsAsFlow(repositoryName) {
state = "open"
sort = "created"
direction = "desc"
}
pullRequestsFlow.collect { println(it) }

Parameters

repositoryName

The name of the GitHub repository.

filter

A lambda expression to configure the filter for the pull requests.