diff --git a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs index 44c714e3bf..fd59ec338f 100644 --- a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs @@ -103,10 +103,10 @@ public interface IObservableIssuesEventsClient /// /// The owner of the repository /// The name of the repository - /// The event id + /// 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 eventId); /// /// Gets a single event @@ -115,9 +115,9 @@ public interface IObservableIssuesEventsClient /// http://developer.github.com/v3/issues/events/#get-a-single-event /// /// The Id of the repository - /// The event id + /// 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 eventId); } } diff --git a/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs b/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs index c435c15bb7..8cf89849cc 100644 --- a/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs @@ -157,13 +157,13 @@ 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) + /// The event id + public IObservable Get(string owner, string name, long eventId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return _client.Get(owner, name, number).ToObservable(); + return _client.Get(owner, name, eventId).ToObservable(); } /// @@ -173,10 +173,10 @@ public IObservable Get(string owner, string name, int number) /// http://developer.github.com/v3/issues/events/#get-a-single-event /// /// The Id of the repository - /// The event id - public IObservable Get(long repositoryId, int number) + /// The event id + public IObservable Get(long repositoryId, long eventId) { - return _client.Get(repositoryId, number).ToObservable(); + return _client.Get(repositoryId, eventId).ToObservable(); } } } \ No newline at end of file diff --git a/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs index 7d6b229a7f..9daa2834fd 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; + var 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; + var issueEventId = issueEvents[0].Id; var issueEventLookupById = await _issuesEventsClient.Get(_context.Repository.Id, issueEventId); diff --git a/Octokit/Clients/IIssuesEventsClient.cs b/Octokit/Clients/IIssuesEventsClient.cs index 62905aea7a..f153c90772 100644 --- a/Octokit/Clients/IIssuesEventsClient.cs +++ b/Octokit/Clients/IIssuesEventsClient.cs @@ -104,10 +104,10 @@ public interface IIssuesEventsClient /// /// The owner of the repository /// The name of the repository - /// The event id + /// 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 eventId); /// /// Gets a single event @@ -116,9 +116,9 @@ public interface IIssuesEventsClient /// http://developer.github.com/v3/issues/events/#get-a-single-event /// /// The Id of the repository - /// The event id + /// 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 eventId); } } diff --git a/Octokit/Clients/IssuesEventsClient.cs b/Octokit/Clients/IssuesEventsClient.cs index d27f92e34d..6f9f9b188f 100644 --- a/Octokit/Clients/IssuesEventsClient.cs +++ b/Octokit/Clients/IssuesEventsClient.cs @@ -149,13 +149,13 @@ 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) + /// The event id + public Task Get(string owner, string name, long eventId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return ApiConnection.Get(ApiUrls.IssuesEvent(owner, name, number)); + return ApiConnection.Get(ApiUrls.IssuesEvent(owner, name, eventId)); } /// @@ -165,10 +165,10 @@ public Task Get(string owner, string name, int number) /// http://developer.github.com/v3/issues/events/#get-a-single-event /// /// The Id of the repository - /// The event id - public Task Get(long repositoryId, int number) + /// The event id + public Task Get(long repositoryId, long eventId) { - return ApiConnection.Get(ApiUrls.IssuesEvent(repositoryId, number)); + return ApiConnection.Get(ApiUrls.IssuesEvent(repositoryId, eventId)); } } } \ No newline at end of file diff --git a/Octokit/Helpers/ApiUrls.cs b/Octokit/Helpers/ApiUrls.cs index 7c82bb05d5..48cf5db7e1 100644 --- a/Octokit/Helpers/ApiUrls.cs +++ b/Octokit/Helpers/ApiUrls.cs @@ -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); } @@ -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); } 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