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

Add support for Draft PR status in responses #927

Closed
wants to merge 2 commits into from

Conversation

omgjlk
Copy link
Collaborator

@omgjlk omgjlk commented Feb 16, 2019

This adds response data support for the draft status of a pull
request. This was recently
added
to the platform and API. A PullRequest can be marked as a draft which
will prevent merging and delay triggering automatic pull request reviews
from CODEOWNERS.

Support for receiving the data is still in preview so new headers have
to be littered throughout the codebase.

Resolves: #926

This adds response data support for the `draft` status of a pull
request. This was recently
[added](https://github.blog/2019-02-14-introducing-draft-pull-requests/)
to the platform and API. A PullRequest can be marked as a `draft` which
will prevent merging and delay triggering automatic pull request reviews
from `CODEOWNERS`.

Support for receiving the data is still in preview so new headers have
to be littered throughout the codebase.

Resolves: sigmavirus24#926
@omgjlk
Copy link
Collaborator Author

omgjlk commented Feb 16, 2019

In a nice bit of meta, I've marked this PR as a draft!

I was able to get unit tests to pass locally, however failures might be being masked by a fallback setting on draft attribute to False, due to not every repo supporting Draft PRs. I do not know what the data from GitHub looks like on a repository that does not support Draft status. The data might not show up, or it may just say False.

All the relevant integration test data needs to be updated to, and tests added to ensure that we ARE finding that a PR is in draft mode when we should be.

src/github3/pulls.py Outdated Show resolved Hide resolved
Co-Authored-By: omgjlk <omgjlk@github.com>
@opendev-zuul
Copy link

opendev-zuul bot commented Feb 17, 2019

Build succeeded (third-party-check pipeline).

@dsully
Copy link

dsully commented Aug 27, 2019

Would love to see this PR get merged.

@sigmavirus24
Copy link
Owner

I believe this is supported in main today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for draft PRs
3 participants