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

create-pr: enable specifing the draft mode #34

Open
TomasTomecek opened this issue Mar 7, 2019 · 3 comments
Open

create-pr: enable specifing the draft mode #34

TomasTomecek opened this issue Mar 7, 2019 · 3 comments

Comments

@TomasTomecek
Copy link
Member

TomasTomecek commented Mar 7, 2019

If PR title starts with 'WIP', use draft mode.

@Toaster192
Copy link

Doesn't seem to be implemented yet by pyGithub https://pygithub.readthedocs.io/en/latest/github_objects/Repository.html?highlight=draft#github.Repository.Repository.create_pull
API:
https://developer.github.com/v3/pulls/#input

That means not even moving to ogr would welp? (without doing a manual API call)

@lachmanfrantisek
Copy link
Member

Yes, It is currently possible only with custom media type in header:

Note: The Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the blog post preview for more details. To access the new draft parameter during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.shadow-cat-preview

I'm not sure if we can force PyGithub to use it. (If I remember correctly, editing header on the PyGithub site would be hard as well. So we need to wait for the stable API.)

@TomasTomecek
Copy link
Member Author

...and sadly PyGithub is kinda-dead -- a lot of pull requests with no response or a lack of feedback

I think it should be possible to inherit from a pygithub class and change the headers like that: or send a PR and fix it in their codebase.

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

No branches or pull requests

3 participants