Skip to content

Commit

Permalink
Add merge_commit_sha to PullRequest model (#1562)
Browse files Browse the repository at this point in the history
* Add merge_commit_sha to PullRequest model

* Update MergeCommitSha summary
  • Loading branch information
alexperovich authored and ryangribble committed Mar 11, 2017
1 parent 16f7d86 commit a952eb8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Octokit/Models/Response/PullRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public PullRequest(int number)
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<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, string mergeCommitSha, int comments, int commits, int additions, int deletions, int changedFiles, Milestone milestone, bool locked)
{
Id = id;
Url = url;
Expand All @@ -39,6 +39,7 @@ public PullRequest(long id, Uri url, Uri htmlUrl, Uri diffUrl, Uri patchUrl, Uri
Assignees = assignees;
Mergeable = mergeable;
MergedBy = mergedBy;
MergeCommitSha = mergeCommitSha;
Comments = comments;
Commits = commits;
Additions = additions;
Expand Down Expand Up @@ -171,6 +172,15 @@ public bool Merged
/// </summary>
public User MergedBy { get; protected set; }

/// <summary>
/// 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.
/// </summary>
public string MergeCommitSha { get; protected set; }

/// <summary>
/// Total number of comments contained in the pull request.
/// </summary>
Expand Down

0 comments on commit a952eb8

Please sign in to comment.