Enable pagination convention tests (#1659)

* Unskip pagination convention tests and rework exclusion property names
Also exclude Obsolete methods from pagination convention tests

* Reaction APIs appear to support pagination, flag to exclude for now and mark a TODO that they need implementing

* Repository invitation APIs need pagination implemented

* Exclude methods that use an alternative pagination approach

* Migrations, Licenses and References all need pagination implemented

* Pagination not supported for these methods (determined by API doc and poking the API) so exclude them from convention tests

* These methods need renaming to GetAll

* Rename offending RepositoryTrafficClient GetReferrers and GetPaths to GetAllReferrers and GetAllPaths

* Rename offending RepositoryBranchesClient methods from Get to GetAll
This commit is contained in:
Ryan Gribble
2017-09-03 11:50:02 +10:00
committed by GitHub
parent f96d75fc1b
commit 1e474f8556
30 changed files with 709 additions and 173 deletions
+90 -3
View File
@@ -370,7 +370,36 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllRequiredStatusChecksContexts instead")]
public Task<IReadOnlyList<string>> GetRequiredStatusChecksContexts(string owner, string name, string branch)
{
return GetAllRequiredStatusChecksContexts(owner, name, branch);
}
/// <summary>
/// Get the required status checks contexts for the specified branch
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllRequiredStatusChecksContexts instead")]
public Task<IReadOnlyList<string>> GetRequiredStatusChecksContexts(long repositoryId, string branch)
{
return GetAllRequiredStatusChecksContexts(repositoryId, branch);
}
/// <summary>
/// Get the required status checks contexts for the specified branch
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
public Task<IReadOnlyList<string>> GetAllRequiredStatusChecksContexts(string owner, string name, string branch)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
@@ -387,7 +416,7 @@ namespace Octokit
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
public Task<IReadOnlyList<string>> GetRequiredStatusChecksContexts(long repositoryId, string branch)
public Task<IReadOnlyList<string>> GetAllRequiredStatusChecksContexts(long repositoryId, string branch)
{
Ensure.ArgumentNotNullOrEmptyString(branch, "branch");
@@ -840,7 +869,36 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")]
public Task<IReadOnlyList<Team>> GetProtectedBranchTeamRestrictions(string owner, string name, string branch)
{
return GetAllProtectedBranchTeamRestrictions(owner, name, branch);
}
/// <summary>
/// Get team restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-team-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")]
public Task<IReadOnlyList<Team>> GetProtectedBranchTeamRestrictions(long repositoryId, string branch)
{
return GetAllProtectedBranchTeamRestrictions(repositoryId, branch);
}
/// <summary>
/// Get team restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-team-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
public Task<IReadOnlyList<Team>> GetAllProtectedBranchTeamRestrictions(string owner, string name, string branch)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
@@ -857,7 +915,7 @@ namespace Octokit
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
public Task<IReadOnlyList<Team>> GetProtectedBranchTeamRestrictions(long repositoryId, string branch)
public Task<IReadOnlyList<Team>> GetAllProtectedBranchTeamRestrictions(long repositoryId, string branch)
{
Ensure.ArgumentNotNullOrEmptyString(branch, "branch");
@@ -984,7 +1042,36 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")]
public Task<IReadOnlyList<User>> GetProtectedBranchUserRestrictions(string owner, string name, string branch)
{
return GetAllProtectedBranchUserRestrictions(owner, name, branch);
}
/// <summary>
/// Get user restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-user-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")]
public Task<IReadOnlyList<User>> GetProtectedBranchUserRestrictions(long repositoryId, string branch)
{
return GetAllProtectedBranchUserRestrictions(repositoryId, branch);
}
/// <summary>
/// Get user restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-user-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
public Task<IReadOnlyList<User>> GetAllProtectedBranchUserRestrictions(string owner, string name, string branch)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
@@ -1001,7 +1088,7 @@ namespace Octokit
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
public Task<IReadOnlyList<User>> GetProtectedBranchUserRestrictions(long repositoryId, string branch)
public Task<IReadOnlyList<User>> GetAllProtectedBranchUserRestrictions(long repositoryId, string branch)
{
Ensure.ArgumentNotNullOrEmptyString(branch, "branch");