From 08b3a5433fee2582f0508cc96abebe66156a7a4d Mon Sep 17 00:00:00 2001 From: Terrance Jevon Date: Thu, 24 Oct 2019 18:35:22 +0200 Subject: [PATCH] Fix Issue #2031 - Updated Model with long Id - Fixed tests - Updated IssuesClient and interface - Updated IssuesEventsClient and interface --- .../Clients/IObservableIssuesClient.cs | 16 ++++++++-------- .../Clients/IObservableIssuesEventsClient.cs | 12 ++++++------ .../Clients/ObservableIssuesClient.cs | 16 ++++++++-------- .../Clients/ObservableIssuesEventsClient.cs | 12 ++++++------ .../Clients/IssuesEventsClientTests.cs | 4 ++-- Octokit/Clients/IIssuesClient.cs | 16 ++++++++-------- Octokit/Clients/IIssuesEventsClient.cs | 12 ++++++------ Octokit/Clients/IssuesClient.cs | 16 ++++++++-------- Octokit/Clients/IssuesEventsClient.cs | 12 ++++++------ Octokit/Helpers/ApiUrls.cs | 18 +++++++++--------- Octokit/Models/Response/IssueEvent.cs | 4 ++-- 11 files changed, 69 insertions(+), 69 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservableIssuesClient.cs b/Octokit.Reactive/Clients/IObservableIssuesClient.cs index 8abef9a88a..628cf7fb00 100644 --- a/Octokit.Reactive/Clients/IObservableIssuesClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssuesClient.cs @@ -55,7 +55,7 @@ public interface IObservableIssuesClient /// The issue number [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - IObservable Get(string owner, string name, int number); + IObservable Get(string owner, string name, long number); /// /// Gets a single Issue by number. @@ -67,7 +67,7 @@ public interface IObservableIssuesClient /// The issue number [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - IObservable Get(long repositoryId, int number); + IObservable Get(long repositoryId, long number); /// /// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible @@ -304,7 +304,7 @@ public interface IObservableIssuesClient /// The issue number /// An instance describing the changes to make to the issue /// - IObservable Update(string owner, string name, int number, IssueUpdate issueUpdate); + IObservable Update(string owner, string name, long number, IssueUpdate issueUpdate); /// /// Creates an issue for the specified repository. Any user with pull access to a repository can create an @@ -315,7 +315,7 @@ public interface IObservableIssuesClient /// The issue number /// An instance describing the changes to make to the issue /// - IObservable Update(long repositoryId, int number, IssueUpdate issueUpdate); + IObservable Update(long repositoryId, long number, IssueUpdate issueUpdate); /// /// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue. @@ -324,7 +324,7 @@ public interface IObservableIssuesClient /// The owner of the repository /// The name of the repository /// The issue number - IObservable Lock(string owner, string name, int number); + IObservable Lock(string owner, string name, long number); /// /// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue. @@ -332,7 +332,7 @@ public interface IObservableIssuesClient /// https://developer.github.com/v3/issues/#lock-an-issue /// The Id of the repository /// The issue number - IObservable Lock(long repositoryId, int number); + IObservable Lock(long repositoryId, long number); /// /// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue. @@ -341,7 +341,7 @@ public interface IObservableIssuesClient /// The owner of the repository /// The name of the repository /// The issue number - IObservable Unlock(string owner, string name, int number); + IObservable Unlock(string owner, string name, long number); /// /// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue. @@ -349,6 +349,6 @@ public interface IObservableIssuesClient /// https://developer.github.com/v3/issues/#unlock-an-issue /// The Id of the repository /// The issue number - IObservable Unlock(long repositoryId, int number); + IObservable Unlock(long repositoryId, long number); } } \ No newline at end of file diff --git a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs index 44c714e3bf..521d48c4c8 100644 --- a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs @@ -20,7 +20,7 @@ public interface IObservableIssuesEventsClient /// The owner of the repository /// The name of the repository /// The issue number - IObservable GetAllForIssue(string owner, string name, int number); + IObservable GetAllForIssue(string owner, string name, long number); /// /// Gets all events for the issue. @@ -30,7 +30,7 @@ public interface IObservableIssuesEventsClient /// /// The Id of the repository /// The issue number - IObservable GetAllForIssue(long repositoryId, int number); + IObservable GetAllForIssue(long repositoryId, long number); /// /// Gets all events for the issue. @@ -42,7 +42,7 @@ public interface IObservableIssuesEventsClient /// The name of the repository /// The issue number /// Options for changing the API response - IObservable GetAllForIssue(string owner, string name, int number, ApiOptions options); + IObservable GetAllForIssue(string owner, string name, long number, ApiOptions options); /// /// Gets all events for the issue. @@ -53,7 +53,7 @@ public interface IObservableIssuesEventsClient /// The Id of the repository /// The issue number /// Options for changing the API response - IObservable GetAllForIssue(long repositoryId, int number, ApiOptions options); + IObservable GetAllForIssue(long repositoryId, long number, ApiOptions options); /// /// Gets all events for the repository. @@ -106,7 +106,7 @@ public interface IObservableIssuesEventsClient /// The event id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - IObservable Get(string owner, string name, int number); + IObservable Get(string owner, string name, long number); /// /// Gets a single event @@ -118,6 +118,6 @@ public interface IObservableIssuesEventsClient /// The event id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - IObservable Get(long repositoryId, int number); + IObservable Get(long repositoryId, long number); } } diff --git a/Octokit.Reactive/Clients/ObservableIssuesClient.cs b/Octokit.Reactive/Clients/ObservableIssuesClient.cs index fb38ed2134..ebf1f7ef03 100644 --- a/Octokit.Reactive/Clients/ObservableIssuesClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssuesClient.cs @@ -71,7 +71,7 @@ public ObservableIssuesClient(IGitHubClient client) /// The owner of the repository /// The name of the repository /// The issue number - public IObservable Get(string owner, string name, int number) + public IObservable Get(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -87,7 +87,7 @@ public IObservable Get(string owner, string name, int number) /// /// The Id of the repository /// The issue number - public IObservable Get(long repositoryId, int number) + public IObservable Get(long repositoryId, long number) { return _client.Get(repositoryId, number).ToObservable(); } @@ -448,7 +448,7 @@ public IObservable Create(long repositoryId, NewIssue newIssue) /// The issue number /// An instance describing the changes to make to the issue /// - public IObservable Update(string owner, string name, int number, IssueUpdate issueUpdate) + public IObservable Update(string owner, string name, long number, IssueUpdate issueUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -466,7 +466,7 @@ public IObservable Update(string owner, string name, int number, IssueUpd /// The issue number /// An instance describing the changes to make to the issue /// - public IObservable Update(long repositoryId, int number, IssueUpdate issueUpdate) + public IObservable Update(long repositoryId, long number, IssueUpdate issueUpdate) { Ensure.ArgumentNotNull(issueUpdate, nameof(issueUpdate)); @@ -480,7 +480,7 @@ public IObservable Update(long repositoryId, int number, IssueUpdate issu /// The owner of the repository /// The name of the repository /// The issue number - public IObservable Lock(string owner, string name, int number) + public IObservable Lock(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -494,7 +494,7 @@ public IObservable Lock(string owner, string name, int number) /// https://developer.github.com/v3/issues/#lock-an-issue /// The Id of the repository /// The issue number - public IObservable Lock(long repositoryId, int number) + public IObservable Lock(long repositoryId, long number) { return _client.Lock(repositoryId, number).ToObservable(); } @@ -506,7 +506,7 @@ public IObservable Lock(long repositoryId, int number) /// The owner of the repository /// The name of the repository /// The issue number - public IObservable Unlock(string owner, string name, int number) + public IObservable Unlock(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -520,7 +520,7 @@ public IObservable Unlock(string owner, string name, int number) /// https://developer.github.com/v3/issues/#unlock-an-issue /// The Id of the repository /// The issue number - public IObservable Unlock(long repositoryId, int number) + public IObservable Unlock(long repositoryId, long number) { return _client.Unlock(repositoryId, number).ToObservable(); } diff --git a/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs b/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs index c435c15bb7..640b28c6a9 100644 --- a/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs @@ -32,7 +32,7 @@ public ObservableIssuesEventsClient(IGitHubClient client) /// The owner of the repository /// The name of the repository /// The issue number - public IObservable GetAllForIssue(string owner, string name, int number) + public IObservable GetAllForIssue(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -48,7 +48,7 @@ public IObservable GetAllForIssue(string owner, string name, int numb /// /// The Id of the repository /// The issue number - public IObservable GetAllForIssue(long repositoryId, int number) + public IObservable GetAllForIssue(long repositoryId, long number) { return GetAllForIssue(repositoryId, number, ApiOptions.None); } @@ -63,7 +63,7 @@ public IObservable GetAllForIssue(long repositoryId, int number) /// The name of the repository /// The issue number /// Options for changing the API response - public IObservable GetAllForIssue(string owner, string name, int number, ApiOptions options) + public IObservable GetAllForIssue(string owner, string name, long number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -81,7 +81,7 @@ public IObservable GetAllForIssue(string owner, string name, int numb /// The Id of the repository /// The issue number /// Options for changing the API response - public IObservable GetAllForIssue(long repositoryId, int number, ApiOptions options) + public IObservable GetAllForIssue(long repositoryId, long number, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); @@ -158,7 +158,7 @@ public IObservable GetAllForRepository(long repositoryId, ApiOptions /// The owner of the repository /// The name of the repository /// The event id - public IObservable Get(string owner, string name, int number) + public IObservable Get(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -174,7 +174,7 @@ public IObservable Get(string owner, string name, int number) /// /// The Id of the repository /// The event id - public IObservable Get(long repositoryId, int number) + public IObservable Get(long repositoryId, long number) { return _client.Get(repositoryId, number).ToObservable(); } diff --git a/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs index 7d6b229a7f..0ba2ce71dc 100644 --- a/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs @@ -402,7 +402,7 @@ public async Task CanRetrieveIssueEventById() var closed = await _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new IssueUpdate { State = ItemState.Closed }); Assert.NotNull(closed); var issueEvents = await _issuesEventsClient.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName); - int issueEventId = issueEvents[0].Id; + long issueEventId = issueEvents[0].Id; var issueEventLookupById = await _issuesEventsClient.Get(_context.RepositoryOwner, _context.RepositoryName, issueEventId); @@ -418,7 +418,7 @@ public async Task CanRetrieveIssueEventByIdWithRepositoryId() var closed = await _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new IssueUpdate { State = ItemState.Closed }); Assert.NotNull(closed); var issueEvents = await _issuesEventsClient.GetAllForRepository(_context.Repository.Id); - int issueEventId = issueEvents[0].Id; + long issueEventId = issueEvents[0].Id; var issueEventLookupById = await _issuesEventsClient.Get(_context.Repository.Id, issueEventId); diff --git a/Octokit/Clients/IIssuesClient.cs b/Octokit/Clients/IIssuesClient.cs index 4a71cc86fc..6dd3210441 100644 --- a/Octokit/Clients/IIssuesClient.cs +++ b/Octokit/Clients/IIssuesClient.cs @@ -52,7 +52,7 @@ public interface IIssuesClient /// The issue number [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - Task Get(string owner, string name, int number); + Task Get(string owner, string name, long number); /// /// Gets a single Issue by number. @@ -64,7 +64,7 @@ public interface IIssuesClient /// The issue number [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - Task Get(long repositoryId, int number); + Task Get(long repositoryId, long number); /// /// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible @@ -301,7 +301,7 @@ public interface IIssuesClient /// The issue number /// An instance describing the changes to make to the issue /// - Task Update(string owner, string name, int number, IssueUpdate issueUpdate); + Task Update(string owner, string name, long number, IssueUpdate issueUpdate); /// /// Updates an issue for the specified repository. Any user with pull access to a repository can update an @@ -312,7 +312,7 @@ public interface IIssuesClient /// The issue number /// An instance describing the changes to make to the issue /// - Task Update(long repositoryId, int number, IssueUpdate issueUpdate); + Task Update(long repositoryId, long number, IssueUpdate issueUpdate); /// /// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue. @@ -321,7 +321,7 @@ public interface IIssuesClient /// The owner of the repository /// The name of the repository /// The issue number - Task Lock(string owner, string name, int number); + Task Lock(string owner, string name, long number); /// /// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue. @@ -329,7 +329,7 @@ public interface IIssuesClient /// https://developer.github.com/v3/issues/#lock-an-issue /// The Id of the repository /// The issue number - Task Lock(long repositoryId, int number); + Task Lock(long repositoryId, long number); /// /// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue. @@ -338,7 +338,7 @@ public interface IIssuesClient /// The owner of the repository /// The name of the repository /// The issue number - Task Unlock(string owner, string name, int number); + Task Unlock(string owner, string name, long number); /// /// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue. @@ -346,6 +346,6 @@ public interface IIssuesClient /// https://developer.github.com/v3/issues/#unlock-an-issue /// The Id of the repository /// The issue number - Task Unlock(long repositoryId, int number); + Task Unlock(long repositoryId, long number); } } \ No newline at end of file diff --git a/Octokit/Clients/IIssuesEventsClient.cs b/Octokit/Clients/IIssuesEventsClient.cs index 62905aea7a..5d2dd94db4 100644 --- a/Octokit/Clients/IIssuesEventsClient.cs +++ b/Octokit/Clients/IIssuesEventsClient.cs @@ -21,7 +21,7 @@ public interface IIssuesEventsClient /// The owner of the repository /// The name of the repository /// The issue number - Task> GetAllForIssue(string owner, string name, int number); + Task> GetAllForIssue(string owner, string name, long number); /// /// Gets all events for the issue. @@ -31,7 +31,7 @@ public interface IIssuesEventsClient /// /// The Id of the repository /// The issue number - Task> GetAllForIssue(long repositoryId, int number); + Task> GetAllForIssue(long repositoryId, long number); /// /// Gets all events for the issue. @@ -43,7 +43,7 @@ public interface IIssuesEventsClient /// The name of the repository /// The issue number /// Options for changing the API response - Task> GetAllForIssue(string owner, string name, int number, ApiOptions options); + Task> GetAllForIssue(string owner, string name, long number, ApiOptions options); /// /// Gets all events for the issue. @@ -54,7 +54,7 @@ public interface IIssuesEventsClient /// The Id of the repository /// The issue number /// Options for changing the API response - Task> GetAllForIssue(long repositoryId, int number, ApiOptions options); + Task> GetAllForIssue(long repositoryId, long number, ApiOptions options); /// /// Gets all events for the repository. @@ -107,7 +107,7 @@ public interface IIssuesEventsClient /// The event id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - Task Get(string owner, string name, int number); + Task Get(string owner, string name, long number); /// /// Gets a single event @@ -119,6 +119,6 @@ public interface IIssuesEventsClient /// The event id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - Task Get(long repositoryId, int number); + Task Get(long repositoryId, long number); } } diff --git a/Octokit/Clients/IssuesClient.cs b/Octokit/Clients/IssuesClient.cs index 3574a9f1e5..38ce18e9e9 100644 --- a/Octokit/Clients/IssuesClient.cs +++ b/Octokit/Clients/IssuesClient.cs @@ -66,7 +66,7 @@ public IssuesClient(IApiConnection apiConnection) : base(apiConnection) /// The owner of the repository /// The name of the repository /// The issue number - public Task Get(string owner, string name, int number) + public Task Get(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -82,7 +82,7 @@ public Task Get(string owner, string name, int number) /// /// The Id of the repository /// The issue number - public Task Get(long repositoryId, int number) + public Task Get(long repositoryId, long number) { return ApiConnection.Get(ApiUrls.Issue(repositoryId, number), null, AcceptHeaders.ReactionsPreview); } @@ -442,7 +442,7 @@ public Task Create(long repositoryId, NewIssue newIssue) /// The issue number /// An instance describing the changes to make to the issue /// - public Task Update(string owner, string name, int number, IssueUpdate issueUpdate) + public Task Update(string owner, string name, long number, IssueUpdate issueUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -460,7 +460,7 @@ public Task Update(string owner, string name, int number, IssueUpdate iss /// The issue number /// An instance describing the changes to make to the issue /// - public Task Update(long repositoryId, int number, IssueUpdate issueUpdate) + public Task Update(long repositoryId, long number, IssueUpdate issueUpdate) { Ensure.ArgumentNotNull(issueUpdate, nameof(issueUpdate)); @@ -474,7 +474,7 @@ public Task Update(long repositoryId, int number, IssueUpdate issueUpdate /// The owner of the repository /// The name of the repository /// The issue number - public Task Lock(string owner, string name, int number) + public Task Lock(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -488,7 +488,7 @@ public Task Lock(string owner, string name, int number) /// https://developer.github.com/v3/issues/#lock-an-issue /// The Id of the repository /// The issue number - public Task Lock(long repositoryId, int number) + public Task Lock(long repositoryId, long number) { return ApiConnection.Put(ApiUrls.IssueLock(repositoryId, number), new object(), null, AcceptHeaders.IssueLockingUnlockingApiPreview); } @@ -500,7 +500,7 @@ public Task Lock(long repositoryId, int number) /// The owner of the repository /// The name of the repository /// The issue number - public Task Unlock(string owner, string name, int number) + public Task Unlock(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -514,7 +514,7 @@ public Task Unlock(string owner, string name, int number) /// https://developer.github.com/v3/issues/#unlock-an-issue /// The Id of the repository /// The issue number - public Task Unlock(long repositoryId, int number) + public Task Unlock(long repositoryId, long number) { return ApiConnection.Delete(ApiUrls.IssueLock(repositoryId, number), new object(), AcceptHeaders.IssueLockingUnlockingApiPreview); } diff --git a/Octokit/Clients/IssuesEventsClient.cs b/Octokit/Clients/IssuesEventsClient.cs index d27f92e34d..90e9220047 100644 --- a/Octokit/Clients/IssuesEventsClient.cs +++ b/Octokit/Clients/IssuesEventsClient.cs @@ -24,7 +24,7 @@ public IssuesEventsClient(IApiConnection apiConnection) : base(apiConnection) /// The owner of the repository /// The name of the repository /// The issue number - public Task> GetAllForIssue(string owner, string name, int number) + public Task> GetAllForIssue(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -40,7 +40,7 @@ public Task> GetAllForIssue(string owner, string name, /// /// The Id of the repository /// The issue number - public Task> GetAllForIssue(long repositoryId, int number) + public Task> GetAllForIssue(long repositoryId, long number) { return GetAllForIssue(repositoryId, number, ApiOptions.None); } @@ -55,7 +55,7 @@ public Task> GetAllForIssue(long repositoryId, int numb /// The name of the repository /// The issue number /// Options for changing the API response - public Task> GetAllForIssue(string owner, string name, int number, ApiOptions options) + public Task> GetAllForIssue(string owner, string name, long number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -73,7 +73,7 @@ public Task> GetAllForIssue(string owner, string name, /// The Id of the repository /// The issue number /// Options for changing the API response - public Task> GetAllForIssue(long repositoryId, int number, ApiOptions options) + public Task> GetAllForIssue(long repositoryId, long number, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); @@ -150,7 +150,7 @@ public Task> GetAllForRepository(long repositoryId, Ap /// The owner of the repository /// The name of the repository /// The event id - public Task Get(string owner, string name, int number) + public Task Get(string owner, string name, long number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -166,7 +166,7 @@ public Task Get(string owner, string name, int number) /// /// The Id of the repository /// The event id - public Task Get(long repositoryId, int number) + public Task Get(long repositoryId, long number) { return ApiConnection.Get(ApiUrls.IssuesEvent(repositoryId, number)); } diff --git a/Octokit/Helpers/ApiUrls.cs b/Octokit/Helpers/ApiUrls.cs index 06f050f8e5..b6503cd8f7 100644 --- a/Octokit/Helpers/ApiUrls.cs +++ b/Octokit/Helpers/ApiUrls.cs @@ -430,7 +430,7 @@ public static Uri Issues(string organization) /// The name of the repository /// The issue number /// - public static Uri Issue(string owner, string name, int number) + public static Uri Issue(string owner, string name, long number) { return "repos/{0}/{1}/issues/{2}".FormatUri(owner, name, number); } @@ -442,7 +442,7 @@ public static Uri Issue(string owner, string name, int number) /// The name of the repository /// The issue number /// - public static Uri IssueLock(string owner, string name, int number) + public static Uri IssueLock(string owner, string name, long number) { return "repos/{0}/{1}/issues/{2}/lock".FormatUri(owner, name, number); } @@ -815,7 +815,7 @@ public static Uri Events(string owner, string name) /// The name of the repository /// The issue number /// - public static Uri IssuesEvents(string owner, string name, int number) + public static Uri IssuesEvents(string owner, string name, long number) { return "repos/{0}/{1}/issues/{2}/events".FormatUri(owner, name, number); } @@ -838,7 +838,7 @@ public static Uri IssuesEvents(string owner, string name) /// The name of the repository /// The event id /// - public static Uri IssuesEvent(string owner, string name, int id) + public static Uri IssuesEvent(string owner, string name, long id) { return "repos/{0}/{1}/issues/events/{2}".FormatUri(owner, name, id); } @@ -850,7 +850,7 @@ public static Uri IssuesEvent(string owner, string name, int id) /// The name of the repository /// The milestone number /// - public static Uri Milestone(string owner, string name, int number) + public static Uri Milestone(string owner, string name, long number) { return "repos/{0}/{1}/milestones/{2}".FormatUri(owner, name, number); } @@ -2884,7 +2884,7 @@ public static Uri GpgKeys(int id) /// The Id of the repository /// The issue number /// The for the specified issue. - public static Uri Issue(long repositoryId, int number) + public static Uri Issue(long repositoryId, long number) { return "repositories/{0}/issues/{1}".FormatUri(repositoryId, number); } @@ -2950,7 +2950,7 @@ public static Uri IssueLabels(long repositoryId, int number) /// The Id of the repository /// The issue number /// The for the specified issue to be locked/unlocked. - public static Uri IssueLock(long repositoryId, int number) + public static Uri IssueLock(long repositoryId, long number) { return "repositories/{0}/issues/{1}/lock".FormatUri(repositoryId, number); } @@ -2971,7 +2971,7 @@ public static Uri Issues(long repositoryId) /// The Id of the repository /// The event id /// The that returns the issue/pull request event and issue info for the specified event. - public static Uri IssuesEvent(long repositoryId, int id) + public static Uri IssuesEvent(long repositoryId, long id) { return "repositories/{0}/issues/events/{1}".FormatUri(repositoryId, id); } @@ -2982,7 +2982,7 @@ public static Uri IssuesEvent(long repositoryId, int id) /// The Id of the repository /// The issue number /// The that returns the issue/pull request event info for the specified issue. - public static Uri IssuesEvents(long repositoryId, int number) + public static Uri IssuesEvents(long repositoryId, long number) { return "repositories/{0}/issues/{1}/events".FormatUri(repositoryId, number); } diff --git a/Octokit/Models/Response/IssueEvent.cs b/Octokit/Models/Response/IssueEvent.cs index e26d50c080..bd186b0aca 100644 --- a/Octokit/Models/Response/IssueEvent.cs +++ b/Octokit/Models/Response/IssueEvent.cs @@ -9,7 +9,7 @@ public class IssueEvent { public IssueEvent() { } - public IssueEvent(int id, string nodeId, string url, User actor, User assignee, Label label, EventInfoState @event, string commitId, DateTimeOffset createdAt, Issue issue, string commitUrl) + public IssueEvent(long id, string nodeId, string url, User actor, User assignee, Label label, EventInfoState @event, string commitId, DateTimeOffset createdAt, Issue issue, string commitUrl) { Id = id; NodeId = nodeId; @@ -27,7 +27,7 @@ public IssueEvent(int id, string nodeId, string url, User actor, User assignee, /// /// The id of the issue/pull request event. /// - public int Id { get; protected set; } + public long Id { get; protected set; } /// /// GraphQL Node Id