-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change "IssueId" to long
#2890
Change "IssueId" to long
#2890
Conversation
@@ -45,7 +45,7 @@ public Issue(string url, string htmlUrl, string commentsUrl, string eventsUrl, i | |||
/// <summary> | |||
/// The internal Id for this issue (not the issue number) | |||
/// </summary> | |||
public int Id { get; private set; } | |||
public long Id { get; private set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int id
in the constructor to be fixed as well.
There is also NewPullRequest
class with the same issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crazy question, related to the PR after it gets merged. What's the timeline between this getting merged and a release being up on nuget? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, there's a lot more that needs to be done than just changing the Id in Issue.cs. For example, the IIssuesClient.cs uses int all over the place for the Issue number (Id). Further, does the GitHub API even support long when you're updating an issue? As far as I can tell, the Latest Rest API version, which is what Octokit is using, only documents Int, not long.
Issue number is not the same as issue id. |
You are correct, I am in error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My original review was incorrect. @Leh2 has enlightened me. This fix should be good.
are there any other values that will roll over in the near future and should change to long now as well? |
Thank you for the quick fix! Please report back if something seems amiss. |
Just tested the new package, and everything works as expected again 👍 Thank you for the NuGet release 💪 |
Old Octokit versions used int rather than long for Issue.Id; which causes overflow error when parsing responses from the GitHub Issues API. See octokit/octokit.net#2890
Old Octokit versions used int rather than long for Issue.Id; which causes overflow error when parsing responses from the GitHub Issues API. See octokit/octokit.net#2890 (cherry picked from commit 80c8169)
Resolves #2889
Before the change?
int.Max
.After the change?
Pull request checklist
Does this introduce a breaking change?
Consumers using the "Id" will experience a breaking change and need to update their type to
long
.Please see our docs on breaking changes to help!