ome / scc

OME tools for managing the Git(Hub) workflow
https://pypi.org/project/scc/
GNU General Public License v2.0
0 stars 15 forks source link

RFE: exclude PRs that are drafts #262

Closed knabar closed 1 year ago

knabar commented 4 years ago

GitHub introduced draft PRs a while ago: https://github.blog/2019-02-14-introducing-draft-pull-requests/

It would be great if draft mode worked like --exclude!

sbesson commented 4 years ago

Thanks. The draft attribute has been introduced ~1 year ago recent versions of PyGithub have support for it with a boolean attribute allowing to introspect its value.

I expect a combination of enforcing a minimum version of PyGithub in setup.py + updating https://github.com/ome/scc/blob/master/scc/git.py#L900 to test this attribute should be a good starting point.

Main question in terms of API would be:

melissalinkert commented 1 year ago

I was surprised by this in https://github.com/ome/bioformats/pull/3883#issuecomment-1268429792, so another :+1: for excluding drafts by default.

sbesson commented 1 year ago

Thanks @melissalinkert for raising this issue again. This is timely as it follows a decision from the @ome/formats team to make better usage of draft PRs to communicate the in-progress PRs and clarify expectations in terms of review.

In terms of CI, I would also concur that the "not yet ready for review" nature of these PRs (see the original announcement) supports the idea of not including them in the default integration builds.

Before starting to look into the implementation, based on the ownership of the current set of open draft PRs, @dgault @dominikl @will-moore would you have any objection with this change of semantics?

/cc @joshmoore @jburel

will-moore commented 1 year ago

Makes sense 👍

sbesson commented 1 year ago

Now released as https://pypi.org/project/scc/0.19.0/. This should start being used by the nightly CI builds overnight