handle int32 overflow with IssueTimeline API (#2092)

This commit is contained in:
Brendan Forster
2020-02-09 22:11:26 -04:00
committed by GitHub
parent 8dac9688d9
commit 736c3bd388
2 changed files with 9 additions and 2 deletions

View File

@@ -191,6 +191,13 @@ namespace Octokit.Tests.Integration.Clients
Assert.Equal(anotherNewIssue.Id, timelineEventInfos[0].Source.Issue.Id);
}
[IntegrationTest]
public async Task CanDeserializeIssueTimelineWhereIdPreviouslyOverflows()
{
var timelineEvents = await _issueTimelineClient.GetAllForIssue("octokit", "octokit.net", 1595);
Assert.NotEmpty(timelineEvents);
}
public void Dispose()
{
_context.Dispose();

View File

@@ -9,7 +9,7 @@ namespace Octokit
{
public TimelineEventInfo() { }
public TimelineEventInfo(int id, string nodeId, string url, User actor, string commitId, EventInfoState @event, DateTimeOffset createdAt, Label label, User assignee, Milestone milestone, SourceInfo source, RenameInfo rename)
public TimelineEventInfo(long id, string nodeId, string url, User actor, string commitId, EventInfoState @event, DateTimeOffset createdAt, Label label, User assignee, Milestone milestone, SourceInfo source, RenameInfo rename)
{
Id = id;
NodeId = nodeId;
@@ -25,7 +25,7 @@ namespace Octokit
Rename = rename;
}
public int Id { get; protected set; }
public long Id { get; protected set; }
/// <summary>
/// GraphQL Node Id