mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 14:15:12 +00:00
moved function out to separate client
This commit is contained in:
@@ -28,6 +28,7 @@ namespace Octokit
|
||||
Deployment = new DeploymentsClient(apiConnection);
|
||||
PullRequest = new PullRequestsClient(apiConnection);
|
||||
RepositoryComments = new RepositoryCommentsClient(apiConnection);
|
||||
Commits = new RepositoryCommitsClient(apiConnection);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -279,6 +280,14 @@ namespace Octokit
|
||||
///</remarks>
|
||||
public IStatisticsClient Statistics { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Client for GitHub's Repository Commits API
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="http://developer.github.com/v3/repos/commits/">Commits API documentation</a> for more details
|
||||
///</remarks>
|
||||
public IRepositoryCommitsClient Commits { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Client for managing pull requests.
|
||||
/// </summary>
|
||||
@@ -426,23 +435,5 @@ namespace Octokit
|
||||
|
||||
return ApiConnection.Get<Branch>(ApiUrls.RepoBranch(owner, repositoryName, branchName));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compare two references in a repository
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="base">The reference to use as the base commit</param>
|
||||
/// <param name="head">The reference to use as the head commit</param>
|
||||
/// <returns></returns>
|
||||
public Task<CompareResult> Compare(string owner, string name, string @base, string head)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(@base, "base");
|
||||
Ensure.ArgumentNotNullOrEmptyString(head, "head");
|
||||
|
||||
return ApiConnection.Get<CompareResult>(ApiUrls.RepoCompare(owner, name, @base, head));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user