mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 03:01:31 +00:00
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:
@@ -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]
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user