mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 04:40:54 +00:00
implement get repository commit
implementation for getting a single repository commit. Includes implementation, unit tests and xml docs
This commit is contained in:
@@ -30,6 +30,22 @@ namespace Octokit
|
||||
return _apiConnection.Get<CompareResult>(ApiUrls.RepoCompare(owner, name, @base, head));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single commit for a given repository
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">The reference for the commit (SHA)</param>
|
||||
/// <returns></returns>
|
||||
public Task<GitHubCommit> Get(string owner, string name, string reference)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
||||
|
||||
return _apiConnection.Get<GitHubCommit>(ApiUrls.RepositoryCommit(owner, name, reference));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all commits for a given repository
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user