From 7c0ce25a2f15783a68d20e56da9d0ad8b1b325c3 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 27 Aug 2024 13:04:49 -0300 Subject: [PATCH] Issue ID should be a long According to the documentation at https://docs.github.com/en/rest/issues/issues. Fixes #2351 for issue ids. --- .../Extensions.cs | 48 +++++++++---------- .../Clients/IObservableAssigneesClient.cs | 4 +- .../Clients/IObservableIssueCommentsClient.cs | 20 ++++---- .../IObservableIssueReactionsClient.cs | 16 +++---- .../Clients/IObservableIssueTimelineClient.cs | 8 ++-- .../Clients/IObservableIssuesClient.cs | 8 ++-- .../Clients/IObservableIssuesEventsClient.cs | 8 ++-- .../Clients/IObservableIssuesLabelsClient.cs | 24 +++++----- .../Clients/IObservableLockUnlockClient.cs | 8 ++-- .../Clients/ObservableAssigneesClient.cs | 4 +- .../Clients/ObservableIssueCommentsClient.cs | 20 ++++---- .../Clients/ObservableIssueReactionsClient.cs | 16 +++---- .../Clients/ObservableIssueTimelineClient.cs | 8 ++-- .../Clients/ObservableIssuesClient.cs | 8 ++-- .../Clients/ObservableIssuesEventsClient.cs | 8 ++-- .../Clients/ObservableIssuesLabelsClient.cs | 24 +++++----- .../Clients/ObservableLockUnlockClient.cs | 8 ++-- .../Clients/IssueCommentsClientTests.cs | 4 +- .../Reactive/ObservableIssuesClientTests.cs | 2 +- Octokit/Clients/AssigneesClient.cs | 4 +- Octokit/Clients/IAssigneesClient.cs | 4 +- Octokit/Clients/IIssueCommentsClient.cs | 20 ++++---- Octokit/Clients/IIssueReactionsClient.cs | 16 +++---- Octokit/Clients/IIssueTimelineClient.cs | 8 ++-- Octokit/Clients/IIssuesClient.cs | 8 ++-- Octokit/Clients/IIssuesEventsClient.cs | 8 ++-- Octokit/Clients/IIssuesLabelsClient.cs | 24 +++++----- Octokit/Clients/ILockUnlockClient.cs | 8 ++-- Octokit/Clients/IssueCommentsClient.cs | 20 ++++---- Octokit/Clients/IssueReactionsClient.cs | 16 +++---- Octokit/Clients/IssueTimelineClient.cs | 8 ++-- Octokit/Clients/IssuesClient.cs | 8 ++-- Octokit/Clients/IssuesEventsClient.cs | 8 ++-- Octokit/Clients/IssuesLabelsClient.cs | 24 +++++----- Octokit/Clients/LockUnlockClient.cs | 8 ++-- Octokit/Helpers/ApiUrls.cs | 38 +++++++-------- 36 files changed, 238 insertions(+), 238 deletions(-) diff --git a/Octokit.AsyncPaginationExtension/Extensions.cs b/Octokit.AsyncPaginationExtension/Extensions.cs index f41c07fbfe..3a4a541e6e 100644 --- a/Octokit.AsyncPaginationExtension/Extensions.cs +++ b/Octokit.AsyncPaginationExtension/Extensions.cs @@ -43,20 +43,20 @@ public static IPaginatedList GetAllForRepositoryAsync(this IIssueC 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 issueNumber, int pageSize = DEFAULT_PAGE_SIZE) + /// + public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, string owner, string name, long issueNumber, int pageSize = DEFAULT_PAGE_SIZE) => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(owner, name, issueNumber, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - /// - public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, long repositoryId, int issueNumber, int pageSize = DEFAULT_PAGE_SIZE) + /// + public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, long repositoryId, long issueNumber, int pageSize = DEFAULT_PAGE_SIZE) => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(repositoryId, issueNumber, 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 issueNumber, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE) + /// + public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, string owner, string name, long issueNumber, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE) => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(owner, name, issueNumber, 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 issueNumber, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE) + /// + public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, long repositoryId, long issueNumber, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE) => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(repositoryId, issueNumber, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); /// @@ -107,24 +107,24 @@ public static IPaginatedList GetAllForRepositoryAsync(this INotifi public static IPaginatedList GetAllForRepositoryAsync(this INotificationsClient t, long repositoryId, NotificationsRequest 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 IIssueTimelineClient t, string owner, string repo, int issueNumber, int pageSize = DEFAULT_PAGE_SIZE) + /// + public static IPaginatedList GetAllForIssueAsync(this IIssueTimelineClient t, string owner, string repo, long issueNumber, int pageSize = DEFAULT_PAGE_SIZE) => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(owner, repo, issueNumber, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - /// - public static IPaginatedList GetAllForIssueAsync(this IIssueTimelineClient t, long repositoryId, int issueNumber, int pageSize = DEFAULT_PAGE_SIZE) + /// + public static IPaginatedList GetAllForIssueAsync(this IIssueTimelineClient t, long repositoryId, long issueNumber, int pageSize = DEFAULT_PAGE_SIZE) => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(repositoryId, issueNumber, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); /// public static IPaginatedList GetAllLicensesAsync(this IMiscellaneousClient t, int pageSize = DEFAULT_PAGE_SIZE) => pageSize > 0 ? new PaginatedList(t.GetAllLicenses, 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 issueNumber, int pageSize = DEFAULT_PAGE_SIZE) + /// + public static IPaginatedList GetAllAsync(this IIssueReactionsClient t, string owner, string name, long issueNumber, int pageSize = DEFAULT_PAGE_SIZE) => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, issueNumber, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); - /// - public static IPaginatedList GetAllAsync(this IIssueReactionsClient t, long repositoryId, int issueNumber, int pageSize = DEFAULT_PAGE_SIZE) + /// + public static IPaginatedList GetAllAsync(this IIssueReactionsClient t, long repositoryId, long issueNumber, int pageSize = DEFAULT_PAGE_SIZE) => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, issueNumber, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive."); /// @@ -403,12 +403,12 @@ public static IPaginatedList GetAllAnnotationsAsync(this ICh 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