packit / upsint

Upstream Integration: work better with your upstream project.
GNU General Public License v3.0
2 stars 9 forks source link

create-pr: enable specifing the draft mode #34

Open TomasTomecek opened 5 years ago

TomasTomecek commented 5 years ago

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

Toaster192 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

...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.