mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 03:16:11 +00:00
copy from base
This commit is contained in:
@@ -9,6 +9,16 @@ namespace Octokit
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a commit for a given repository by sha reference
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/commits/#get-a-commit
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">Tha sha reference of the commit</param>
|
||||
/// <returns></returns>
|
||||
public Task<Commit> Get(string owner, string name, string reference)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -18,6 +28,16 @@ namespace Octokit
|
||||
return ApiConnection.Get<Commit>(ApiUrls.Commit(owner, name, reference));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a commit for a given repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/commits/#create-a-commit
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="commit">The commit to create</param>
|
||||
/// <returns></returns>
|
||||
public Task<Commit> Create(string owner, string name, NewCommit commit)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
|
||||
Reference in New Issue
Block a user