mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 04:40:54 +00:00
Repository Commits Get All
Added the logic for getting all commits for a repository including unit tests and XML docs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
@@ -28,5 +29,19 @@ namespace Octokit
|
||||
|
||||
return _apiConnection.Get<CompareResult>(ApiUrls.RepoCompare(owner, name, @base, head));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all commits for a given repository
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns></returns>
|
||||
public Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
|
||||
return _apiConnection.GetAll<GitHubCommit>(ApiUrls.RepositoryCommits(owner, name));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user