From 6565a07974b972b54f75cb009c05f335541d1a9a Mon Sep 17 00:00:00 2001 From: Nick Floyd <139819+nickfloyd@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:57:30 -0500 Subject: [PATCH] [BREAKING CHANGES]: int to long Ids for PreReceiveHook, Deployment Environments, Repository, Org Team, Repo Invitations, Public Key, Project Cards, Organization Invitation, Migrations, GpgKey, Deployment, Authorizations, Accounts / Profiles, Codespace / Workspaces (#2941) * Fixes ids for Releases, Collaborators, and Contributors * updates the interface for releases * update the obverable release client * updates ids from int to long based on GH database schema * converts a test condition to use the proper type * updates generated paging and observable classes --- .../Extensions.cs | 1555 +++++++++-------- .../IObservableEnterpriseLdapClient.cs | 4 +- .../ObservableEnterpriseLdapClient.cs | 4 +- .../IObservableAuthorizationsClient.cs | 22 +- .../IObservableDeploymentStatusClient.cs | 12 +- .../Clients/IObservableMigrationsClient.cs | 10 +- .../IObservableOrganizationMembersClient.cs | 4 +- .../Clients/IObservableProjectCardsClient.cs | 8 +- .../Clients/IObservableReleasesClient.cs | 20 +- .../IObservableRepositoryInvitationsClient.cs | 32 +- .../Clients/IObservableTeamsClient.cs | 64 +- .../Clients/IObservableUserGpgKeysClient.cs | 4 +- .../Clients/IObservableUserKeysClient.cs | 4 +- .../Clients/ObservableAuthorizationsClient.cs | 22 +- .../ObservableDeploymentStatusClient.cs | 12 +- .../Clients/ObservableMigrationsClient.cs | 8 +- .../ObservableOrganizationMembersClient.cs | 4 +- .../Clients/ObservableProjectCardsClient.cs | 10 +- .../Clients/ObservableReleasesClient.cs | 20 +- .../ObservableRepositoryInvitationsClient.cs | 8 +- .../Clients/ObservableTeamsClient.cs | 56 +- .../Clients/ObservableUserGpgKeysClient.cs | 4 +- .../Clients/ObservableUserKeysClient.cs | 6 +- .../Clients/GitHubClientTests.cs | 6 +- .../Clients/IssuesClientTests.cs | 4 +- .../Clients/OrganizationMembersClientTests.cs | 32 +- .../Clients/ReleasesClientTests.cs | 4 +- .../Clients/RepositoriesClientTests.cs | 4 +- Octokit.Tests.Integration/Helper.cs | 12 +- .../Helpers/EnterpriseUserContext.cs | 2 +- .../Helpers/GpgKeyContext.cs | 2 +- .../Helpers/PublicKeyContext.cs | 2 +- .../Helpers/TeamContext.cs | 4 +- ...bservableOrganizationMembersClientTests.cs | 34 +- .../Clients/RepositoriesClientTests.cs | 12 +- .../Models/RepositoryTransferTest.cs | 8 +- .../ObservableEnterpriseLdapClientTests.cs | 4 +- Octokit/Clients/AuthorizationsClient.cs | 8 +- Octokit/Clients/Codespace.cs | 6 +- Octokit/Clients/DeploymentStatusClient.cs | 12 +- .../Enterprise/EnterpriseLdapClient.cs | 4 +- .../Enterprise/IEnterpriseLdapClient.cs | 4 +- Octokit/Clients/IAuthorizationsClient.cs | 18 +- Octokit/Clients/IDeploymentStatusClient.cs | 14 +- Octokit/Clients/IMigrationsClient.cs | 10 +- Octokit/Clients/IOrganizationMembersClient.cs | 2 +- Octokit/Clients/IProjectCardsClient.cs | 8 +- Octokit/Clients/IReleasesClient.cs | 20 +- .../Clients/IRepositoryInvitationsClient.cs | 20 +- Octokit/Clients/ITeamsClient.cs | 64 +- Octokit/Clients/IUserGpgKeysClient.cs | 4 +- Octokit/Clients/IUserKeysClient.cs | 4 +- Octokit/Clients/MigrationsClient.cs | 8 +- Octokit/Clients/OrganizationMembersClient.cs | 2 +- Octokit/Clients/ProjectCardsClient.cs | 8 +- Octokit/Clients/ReleasesClient.cs | 20 +- .../Clients/RepositoryInvitationsClient.cs | 8 +- Octokit/Clients/TeamsClient.cs | 190 +- Octokit/Clients/UserGpgKeysClient.cs | 4 +- Octokit/Clients/UserKeysClient.cs | 4 +- Octokit/Helpers/ApiUrls.Authorizations.cs | 2 +- Octokit/Helpers/ApiUrls.cs | 62 +- Octokit/Models/Request/NewTeam.cs | 4 +- .../Request/OrganizationInvitationRequest.cs | 36 +- Octokit/Models/Request/OrganizationRequest.cs | 4 +- Octokit/Models/Request/ProjectCardMove.cs | 2 +- Octokit/Models/Request/RepositoryTransfer.cs | 8 +- Octokit/Models/Response/Account.cs | 6 +- Octokit/Models/Response/Author.cs | 6 +- Octokit/Models/Response/Authorization.cs | 6 +- Octokit/Models/Response/Collaborator.cs | 8 +- Octokit/Models/Response/Deployment.cs | 4 +- .../Models/Response/DeploymentEnvironment.cs | 6 +- .../Response/Enterprise/PreReceiveHook.cs | 4 +- Octokit/Models/Response/GpgKey.cs | 6 +- Octokit/Models/Response/Migration.cs | 4 +- .../OrganizationMembershipInvitation.cs | 4 +- Octokit/Models/Response/ProjectCard.cs | 4 +- Octokit/Models/Response/PublicKey.cs | 4 +- Octokit/Models/Response/Release.cs | 4 +- .../Models/Response/RepositoryContributor.cs | 2 +- .../Models/Response/RepositoryInvitation.cs | 4 +- Octokit/Models/Response/Team.cs | 8 +- Octokit/Models/Response/TeamRepository.cs | 6 +- 84 files changed, 1387 insertions(+), 1282 deletions(-) diff --git a/Octokit.AsyncPaginationExtension/Extensions.cs b/Octokit.AsyncPaginationExtension/Extensions.cs index cd131c8d..347dd096 100644 --- a/Octokit.AsyncPaginationExtension/Extensions.cs +++ b/Octokit.AsyncPaginationExtension/Extensions.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Octokit.Models.Request.Enterprise; namespace Octokit.AsyncPaginationExtension { @@ -13,818 +14,922 @@ namespace Octokit.AsyncPaginationExtension public static class Extensions { private const int DEFAULT_PAGE_SIZE = 30; - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IAssigneesClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IAssigneesClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IAuthorizationsClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAll, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAnnotationsAsync(this ICheckRunsClient t, string owner, string name, long checkRunId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllAnnotations(owner, name, checkRunId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAnnotationsAsync(this ICheckRunsClient t, long repositoryId, long checkRunId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllAnnotations(repositoryId, checkRunId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this ICommitCommentReactionsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this ICommitCommentReactionsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this ICommitStatusClient t, string owner, string name, string reference, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, reference, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this ICommitStatusClient t, long repositoryId, string reference, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, reference, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IDeploymentsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IDeploymentsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IDeploymentStatusClient t, string owner, string name, int deploymentId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, deploymentId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IDeploymentStatusClient t, long repositoryId, int deploymentId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, deploymentId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IEventsClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAll, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IEventsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IEventsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllIssuesForRepositoryAsync(this IEventsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllIssuesForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllIssuesForRepositoryAsync(this IEventsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllIssuesForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryNetworkAsync(this IEventsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepositoryNetwork(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForOrganizationAsync(this IEventsClient t, string organization, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForOrganization(organization, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllUserReceivedAsync(this IEventsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllUserReceived(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllUserReceivedPublicAsync(this IEventsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllUserReceivedPublic(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllUserPerformedAsync(this IEventsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllUserPerformed(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllUserPerformedPublicAsync(this IEventsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllUserPerformedPublic(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForAnOrganizationAsync(this IEventsClient t, string user, string organization, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForAnOrganization(user, organization, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForCurrentAsync(this IFollowersClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAllForCurrent, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IFollowersClient t, string login, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(login, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllFollowingForCurrentAsync(this IFollowersClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAllFollowingForCurrent, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllFollowingAsync(this IFollowersClient t, string login, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllFollowing(login, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForGistAsync(this IGistCommentsClient t, string gistId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForGist(gistId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IGistsClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAll, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IGistsClient t, DateTimeOffset since, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(since, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllPublicAsync(this IGistsClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAllPublic, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllPublicAsync(this IGistsClient t, DateTimeOffset since, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllPublic(since, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllStarredAsync(this IGistsClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAllStarred, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllStarredAsync(this IGistsClient t, DateTimeOffset since, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllStarred(since, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForUserAsync(this IGistsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForUser(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForUserAsync(this IGistsClient t, string user, DateTimeOffset since, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForUser(user, since, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllCommitsAsync(this IGistsClient t, string id, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllCommits(id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForksAsync(this IGistsClient t, string id, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForks(id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllInstallationsForCurrentAsync(this IGitHubAppsClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAllInstallationsForCurrent, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IIssueCommentReactionsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IIssueCommentReactionsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssueCommentsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssueCommentsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssueCommentsClient t, string owner, string name, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssueCommentsClient t, long repositoryId, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, string owner, string name, int number, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(owner, name, number, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, long repositoryId, int number, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(repositoryId, number, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IIssueReactionsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllAsync(this IIssueReactionsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForCurrentAsync(this IIssuesClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAllForCurrent, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForCurrentAsync(this IIssuesClient t, IssueRequest request, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForCurrent(request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForOwnedAndMemberRepositoriesAsync(this IIssuesClient t, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(t.GetAllForOwnedAndMemberRepositories, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForOwnedAndMemberRepositoriesAsync(this IIssuesClient t, IssueRequest request, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForOwnedAndMemberRepositories(request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForOrganizationAsync(this IIssuesClient t, string organization, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForOrganization(organization, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForOrganizationAsync(this IIssuesClient t, string organization, IssueRequest request, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForOrganization(organization, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssuesClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssuesClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssuesClient t, string owner, string name, RepositoryIssueRequest request, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssuesClient t, long repositoryId, RepositoryIssueRequest request, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForIssueAsync(this IIssuesEventsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForIssueAsync(this IIssuesEventsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssuesEventsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList GetAllForRepositoryAsync(this IIssuesEventsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE) - => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - - /// - public static IPaginatedList