-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Changes from 8 commits
67bb3f8
ea59264
901859e
2cb4e5f
8276b1e
f20dfa7
6d72c42
04c829e
6c2c31e
56819df
f72b218
3328977
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,8 @@ public class NewPullRequest | |
/// <param name="title">The title of the pull request.</param> | ||
/// <param name="head">The branch (or git ref where your changes are implemented. In other words, the source branch/ref</param> | ||
/// <param name="baseRef">The base (or git ref) reference you want your changes pulled into. In other words, the target branch/ref</param> | ||
public NewPullRequest(string title, string head, string baseRef) | ||
/// <param name="maintainerCanModify">Whether maintainers of the base repository can push to <paramref name="head"/> if it is a branch</param> | ||
public NewPullRequest(string title, string head, string baseRef, bool maintainerCanModify) | ||
{ | ||
Ensure.ArgumentNotNullOrEmptyString(title, "title"); | ||
Ensure.ArgumentNotNullOrEmptyString(head, "head"); | ||
|
@@ -24,6 +25,7 @@ public NewPullRequest(string title, string head, string baseRef) | |
Title = title; | ||
Head = head; | ||
Base = baseRef; | ||
MaintainerCanModify = maintainerCanModify; | ||
} | ||
|
||
/// <summary> | ||
|
@@ -41,6 +43,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 <see cref="Head"/> if it is a branch | ||
/// </summary> | ||
public bool MaintainerCanModify { get; private set; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be nullable |
||
|
||
/// <summary> | ||
/// Body of the pull request (optional) | ||
/// </summary> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,11 @@ public class PullRequestUpdate | |
/// </summary> | ||
public string Base { get; set; } | ||
|
||
/// <summary> | ||
/// Whether maintainers of the base repository can push to the pull request's HEAD if it is a branch | ||
/// </summary> | ||
public bool MaintainerCanModify { get; set; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should also be nullable |
||
|
||
internal string DebuggerDisplay | ||
{ | ||
get | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we only want mandatory parameters to be in the constructor, so this can be removed sorry! Good news is, all those tests don't need to be modified (and the bad news is you have to undo all the test modifications LOL)