Skip to content
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

Adds MaintainerCanModify to PullRequest #1771

Merged
merged 12 commits into from
Apr 23, 2018
5 changes: 5 additions & 0 deletions Octokit/Models/Request/NewPullRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public NewPullRequest(string title, string head, string baseRef)
/// </summary>
public string Head { get; private set; }

/// <summary>
/// Whether maintainers of the base repository can push to the HEAD branch (optional).
/// </summary>
public bool? MaintainerCanModify { get; set; }

/// <summary>
/// Body of the pull request (optional)
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions Octokit/Models/Request/PullRequestUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public class PullRequestUpdate
/// </summary>
public string Base { get; set; }

/// <summary>
/// Whether maintainers of the base repository can push to the HEAD branch.
/// </summary>
public bool? MaintainerCanModify { get; set; }

internal string DebuggerDisplay
{
get
Expand Down
8 changes: 7 additions & 1 deletion Octokit/Models/Response/PullRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public PullRequest(int number)
Number = number;
}

public PullRequest(long id, string url, string htmlUrl, string diffUrl, string patchUrl, string issueUrl, string 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, MergeableState? mergeableState, User mergedBy, string mergeCommitSha, int comments, int commits, int additions, int deletions, int changedFiles, Milestone milestone, bool locked, IReadOnlyList<User> requestedReviewers)
public PullRequest(long id, string url, string htmlUrl, string diffUrl, string patchUrl, string issueUrl, string 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, MergeableState? mergeableState, User mergedBy, string mergeCommitSha, int comments, int commits, int additions, int deletions, int changedFiles, Milestone milestone, bool locked, bool? maintainerCanModify, IReadOnlyList<User> requestedReviewers)
{
Id = id;
Url = url;
Expand Down Expand Up @@ -49,6 +49,7 @@ public PullRequest(long id, string url, string htmlUrl, string diffUrl, string p
ChangedFiles = changedFiles;
Milestone = milestone;
Locked = locked;
MaintainerCanModify = maintainerCanModify;
RequestedReviewers = requestedReviewers;
}

Expand Down Expand Up @@ -219,6 +220,11 @@ public bool Merged
/// </summary>
public bool Locked { get; protected set; }

/// <summary>
/// Whether maintainers of the base repository can push to the HEAD branch
/// </summary>
public bool? MaintainerCanModify { get; protected set; }

/// <summary>
/// Users requested for review
/// </summary>
Expand Down