Method GetCommitsAsync
GetCommitsAsync(string, string, DateTime, DateTime?, string?, string?)
Retrieves commits from a GitHub repository within a specified time range. Handles pagination for repositories with many commits.
public static Task<IEnumerable<GitHubUtils.CommitInfo>> GetCommitsAsync(string owner, string repo, DateTime since, DateTime? until = null, string? token = null, string? branch = null)
Parameters
ownerstringRepository owner.
repostringRepository name.
sinceDateTimeStart date (UTC).
untilDateTime?End date (UTC). Defaults to current UTC time if null.
tokenstringGitHub token for authenticated access. Optional for public repos.
branchstringThe branch name. If not specified, defaults to "master".
Returns
- Task<IEnumerable<GitHubUtils.CommitInfo>>
A collection of GitHubUtils.CommitInfo containing commit metadata.