From a952eb86c01a225af03d156832b6f69318f8e489 Mon Sep 17 00:00:00 2001 From: Alex Perovich Date: Fri, 10 Mar 2017 18:56:53 -0600 Subject: [PATCH] Add merge_commit_sha to PullRequest model (#1562) * Add merge_commit_sha to PullRequest model * Update MergeCommitSha summary --- Octokit/Models/Response/PullRequest.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Octokit/Models/Response/PullRequest.cs b/Octokit/Models/Response/PullRequest.cs index 5644a0b3..72585bae 100644 --- a/Octokit/Models/Response/PullRequest.cs +++ b/Octokit/Models/Response/PullRequest.cs @@ -15,7 +15,7 @@ namespace Octokit Number = number; } - 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 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 assignees, bool? mergeable, User mergedBy, string mergeCommitSha, int comments, int commits, int additions, int deletions, int changedFiles, Milestone milestone, bool locked) { Id = id; Url = url; @@ -39,6 +39,7 @@ namespace Octokit Assignees = assignees; Mergeable = mergeable; MergedBy = mergedBy; + MergeCommitSha = mergeCommitSha; Comments = comments; Commits = commits; Additions = additions; @@ -171,6 +172,15 @@ namespace Octokit /// public User MergedBy { get; protected set; } + /// + /// The value of this field changes depending on the state of the pull request. + /// Not Merged - the hash of the test commit used to determine mergability. + /// Merged with merge commit - the hash of said merge commit. + /// Merged via squashing - the hash of the squashed commit added to the base branch. + /// Merged via rebase - the hash of the commit that the base branch was updated to. + /// + public string MergeCommitSha { get; protected set; } + /// /// Total number of comments contained in the pull request. ///