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 modifying PR draft status #1461

Open
charlax opened this issue Apr 9, 2020 · 7 comments
Open

Add support for modifying PR draft status #1461

charlax opened this issue Apr 9, 2020 · 7 comments

Comments

@charlax
Copy link

@charlax charlax commented Apr 9, 2020

PullRequest.edit does not allow a draft attribute:

def edit(
        self,
        title=github.GithubObject.NotSet,
        body=github.GithubObject.NotSet,
        state=github.GithubObject.NotSet,
        base=github.GithubObject.NotSet,
    ):
@FlorentClarret
Copy link
Contributor

@FlorentClarret FlorentClarret commented Apr 13, 2020

I might be wrong, but it looks like this is not yet possible to update the draft attribute since this attribute is not exposed : https://developer.github.com/v3/pulls/#update-a-pull-request

@charlax
Copy link
Author

@charlax charlax commented Apr 14, 2020

I think you're right, I tried making a plain HTTP request and it didn't work. Also, in the documentation they hint at this being available only v4.

Bummer.

@sfdye
Copy link
Member

@sfdye sfdye commented Apr 15, 2020

image
I can see it 😳

@FlorentClarret
Copy link
Contributor

@FlorentClarret FlorentClarret commented Apr 15, 2020

It's definitely in the output and the draft attribute is already in the PullRequest class, however it does not seem possible to update it through the PATCH method (I also tried when @charlax submitted the issue)

@sfdye
Copy link
Member

@sfdye sfdye commented Apr 15, 2020

Maybe need some custom headers?

@s-t-e-v-e-n-k
Copy link
Collaborator

@s-t-e-v-e-n-k s-t-e-v-e-n-k commented Apr 15, 2020

Nope, custom headers won't help, the docs don't list it at all for the PATCH call. :-(

@nitishagar
Copy link

@nitishagar nitishagar commented Dec 5, 2021

@sfdye I confirmed what @s-t-e-v-e-n-k has reported here from the docs: https://docs.github.com/en/rest/reference/pulls#update-a-pull-request

In this case do we close this issue or how we approached such request in the past?

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

Successfully merging a pull request may close this issue.

None yet
5 participants