Add support for GitHub Draft PRs
under review
J
Joseph
GitHub released Draft PRs https://twitter.com/github/status/1096093162345508864 We have users requesting we add support to not run against branches without a Draft PR, creating this feature request to gauge interest and inform prioritization. It would be nice to have the option to run CI only on PRs which are not draft PRs, as they are intended as work in progress and are likely to be in a broken state which is expected. The option to force trigger a build on such requests with an API call will be nice to so that developers can develop their own integrations like running CI on a comment in such a PR. And CI should be triggered as soon as the PR is marked as ready for review (not a draft anymore).
CCI-I-883
B
Benedetta Dal Canton
Hi, PM at CircleCI here.
We have just released a
new feature
that will help with this! You can now set up explicit triggers for your pipelines, and configure them to run on a broader range of events, including
"PR marked ready for review"
.We are looking to expand this shortly (ETA a couple of weeks) to also include the option
"Pushes to non-draft PR"
. Other options available (
"PR opened", "PR merged", "“run-ci” label added to PR", "PR opened or pushed to, default branch pushes, tag pushes", "Pushes to default branch", "Tag pushes"
) might also be helpful to you, and we are looking to rapidly expand the range of options provided based on your feedback. For any questions, feedback or help setting this up, respond on here or email me directly at benedetta@circleci.com.
cc Sebastian Lerner
Xavier Portilla Edo (xavidop)
Benedetta Dal Canton OMG this is AMAZING!
B
Benedetta Dal Canton
Hi all, PM at CircleCI here.
We have a proposal of how we'd like to solve this kind of problem, and we'd love to get some feedback on whether this would work for everyone who +1'd this.
In the image below, you have a mockup of a page where you'd be able to configure your Github trigger for a pipeline.
The UI gives you options to subscribe to different types of Github events (push, pull request, issue comment), and you have some presets (the buttons) that let you select common scenarios. You can use the presets only, or opt to edit the code in the editors to express more complex conditions if you like.
In the specific example, the pipeline will run:
- if a tag is pushed
- if a non-draft PR is opened or updated, OR if the label "critical" is added to a PR
- If someone adds the comment "/circleci" to a PR
You would also be able to use the same variables you see here (for example “event.action.type”, "event.issue.pull_request.labels", ...) to express conditionals inside your config file, using the same conditional syntax available today in config.
I’d love to know from you all:
- Do you feel this addresses your use cases?
- Does the UX (using raw logical expressions + some presets) feel natural or confusing?
S
Swaraj Rao [[Unknown]]
Benedetta Dal Canton will there be an option to do this via the config file as well?
S
Sebastian Lerner
Swaraj Rao [[Unknown]] Could you email sebastian@circleci.com with your use case? We are planning many of these fields to be available in config, but I want to make sure that what we're designing works for your use case.
S
Sebastian Lerner
Sorry, I just realized that triggers-feedback@circleci.com is not available to external senders. I changed the comment above to use my email.
B
Benedetta Dal Canton
under review
D
David Aronchick
+1! Just a simple analysis or example would help!
Dimitar Dodnikov
We're really really looking for this, it would be a major pro for CircleCI, please progress
K
Konstantin Gizdov
This is a major requirement for us and the current workarounds are extremely unsatisfactory. Has there been any work on this since 2019?
David Banks
bump
V
Vinicius Suzano
We will leave CircleCI cuz this is not supported yet.
F
Frank West
Yes please
Alexander Kong
This would be a very valuable feature!
Load More
→