mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 12:03:19 +00:00
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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user