/// <summary> /// Gets the commit information associated with a repository in a specified branch. /// The newest commit is first. /// </summary> /// <param name="branchOrTag">The branch or tag to get, for example, master or default.</param> /// <param name="commitsParameters">Optional parameters that allow to filter the commits to return.</param> public List <Commit> ListCommits(string branchOrTag, ListCommitsParameters commitsParameters) { var overrideUrl = _baseUrl + "commits/"; if (!string.IsNullOrEmpty(branchOrTag)) { overrideUrl += branchOrTag; } return(GetPaginatedValues <Commit>(overrideUrl, commitsParameters.Max, commitsParameters.ToDictionary())); }
/// <summary> /// Gets the commit information associated with a repository. /// By default, this call returns all the commits across all branches, bookmarks, and tags. /// The newest commit is first. /// </summary> /// <param name="commitsParameters">Parameters that allow to filter the commits to return.</param> public List <Commit> ListCommits(ListCommitsParameters commitsParameters) => ListCommits(null, commitsParameters);