From 2917b447177a5d3cb8ff074f623542841e9c5813 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Fri, 3 Nov 2017 20:18:40 -0500 Subject: [PATCH] Prevent overflow exceptions when status id > int.Max I have a (private) repository where GitHub reports statuses with ids like 4299360515, which fail to deserialize as it doesn't fit on the int. There is nothing (I could find) on the GitHub API docs that say that this status id is limited to an int-sized value. Fixes #1702 --- Octokit/Models/Response/CommitStatus.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Octokit/Models/Response/CommitStatus.cs b/Octokit/Models/Response/CommitStatus.cs index b8780b60f5..dfc955c50d 100644 --- a/Octokit/Models/Response/CommitStatus.cs +++ b/Octokit/Models/Response/CommitStatus.cs @@ -10,7 +10,7 @@ public class CommitStatus { public CommitStatus() { } - public CommitStatus(DateTimeOffset createdAt, DateTimeOffset updatedAt, CommitState state, string targetUrl, string description, string context, int id, string url, User creator) + public CommitStatus(DateTimeOffset createdAt, DateTimeOffset updatedAt, CommitState state, string targetUrl, string description, string context, long id, string url, User creator) { CreatedAt = createdAt; UpdatedAt = updatedAt; @@ -57,7 +57,7 @@ public CommitStatus(DateTimeOffset createdAt, DateTimeOffset updatedAt, CommitSt /// /// The unique identifier of the status. /// - public int Id { get; protected set; } + public long Id { get; protected set; } /// /// The URL of the status.