commitsAsFlow
fun GithubApi.commitsAsFlow(repositoryName: String, concurrency: Int = 1, filter: CommitQuery.() -> Unit = {}): Flow<Commit>
Retrieves a flow of all commits for the specified GitHub repository, filtered by the given criteria.
Return
A Flow<Commit>
object representing the commits matching the specified filter criteria.
Example usage:
val githubApi = GithubApi("your_api_key_here")
val repositoryName = "owner/repo_name"
val commitsFlow = githubApi.commitsAsFlow(repositoryName) {
since = "2023-01-01T00:00:00Z"
until = "2023-01-31T23:59:59Z"
}
commitsFlow.collect { println(it) }
Content copied to clipboard
Parameters
repositoryName
The name of the GitHub repository.
filter
A lambda expression to configure the filter for the commits.