mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 04:16:51 +00:00
Implement Draft Pull Requests (#2009)
* Add draft PR preview header * Add Draft property to models * Update pull requests client and tests to use draft PR accept header * Update observable pull requests client and tests to use draft PR accept header * Add integration tests to create and retrieve draft pull requests
This commit is contained in:
committed by
Brendan Forster
parent
d955d7facd
commit
fafbf33b78
@@ -50,6 +50,11 @@ namespace Octokit
|
||||
/// Body of the pull request (optional)
|
||||
/// </summary>
|
||||
public string Body { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the pull request is in a draft state or not (optional)
|
||||
/// </summary>
|
||||
public bool? Draft { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Octokit
|
||||
Number = number;
|
||||
}
|
||||
|
||||
public PullRequest(long id, string nodeId, 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, IReadOnlyList<Label> labels)
|
||||
public PullRequest(long id, string nodeId, 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 draft, 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, IReadOnlyList<Label> labels)
|
||||
{
|
||||
Id = id;
|
||||
NodeId = nodeId;
|
||||
@@ -39,6 +39,7 @@ namespace Octokit
|
||||
User = user;
|
||||
Assignee = assignee;
|
||||
Assignees = assignees;
|
||||
Draft = draft;
|
||||
Mergeable = mergeable;
|
||||
MergeableState = mergeableState;
|
||||
MergedBy = mergedBy;
|
||||
@@ -165,6 +166,11 @@ namespace Octokit
|
||||
/// </summary>
|
||||
public Milestone Milestone { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the pull request is in a draft state, and cannot be merged.
|
||||
/// </summary>
|
||||
public bool Draft { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the pull request has been merged.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user