Add Id for PullRequest.cs (#1537)

* add Id for PullRequest.cs

added the Id property for PullRequest model

* use long for pull request id

* update comments for PullRequest.Id and Issue.Id

make it more intuitive... a question, issue.Id and comment.Id are int
type. do we have any concern on it?

* plus the one for pullrequest

forgot to check this change.

* update the integration test for Id Property

long will never be null
This commit is contained in:
Yun Li
2017-01-14 13:50:11 -08:00
committed by Ryan Gribble
parent eeb98c7fcd
commit fcee797311
3 changed files with 9 additions and 2 deletions
@@ -59,6 +59,7 @@ public class PullRequestsClientTests : IDisposable
Assert.Equal(1, pullRequests.Count);
Assert.Equal(result.Title, pullRequests[0].Title);
Assert.True(pullRequests[0].Id > 0);
}
[IntegrationTest]
+1 -1
View File
@@ -38,7 +38,7 @@ namespace Octokit
}
/// <summary>
/// The Id for this issue
/// The internal Id for this issue (not the issue number)
/// </summary>
public int Id { get; protected set; }
+7 -1
View File
@@ -15,8 +15,9 @@ namespace Octokit
Number = number;
}
public PullRequest(Uri url, Uri htmlUrl, Uri diffUrl, Uri patchUrl, Uri issueUrl, Uri statusesUrl, int number, ItemState state, string title, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, DateTimeOffset? closedAt, DateTimeOffset? mergedAt, GitReference head, GitReference @base, User user, User assignee, IReadOnlyList<User> assignees, bool? mergeable, User mergedBy, int comments, int commits, int additions, int deletions, int changedFiles, Milestone milestone, bool locked)
public PullRequest(long id, Uri url, Uri htmlUrl, Uri diffUrl, Uri patchUrl, Uri issueUrl, Uri statusesUrl, int number, ItemState state, string title, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, DateTimeOffset? closedAt, DateTimeOffset? mergedAt, GitReference head, GitReference @base, User user, User assignee, IReadOnlyList<User> assignees, bool? mergeable, User mergedBy, int comments, int commits, int additions, int deletions, int changedFiles, Milestone milestone, bool locked)
{
Id = id;
Url = url;
HtmlUrl = htmlUrl;
DiffUrl = diffUrl;
@@ -47,6 +48,11 @@ namespace Octokit
Locked = locked;
}
/// <summary>
/// The internal Id for this pull request (not the pull request number)
/// </summary>
public long Id { get; protected set; }
/// <summary>
/// The URL for this pull request.
/// </summary>