Deployments and commit status


I built an integration that listens to all kind of webhook events from a GitHub organisation. The integration also has access to commit status.

My goal is to annotate pull requests with deployments (for QA and testing) and noticed that I cannot create a deployment when the commit status for the commit is not yet success.

The repository I am looking at has multiple external services enabled that write to the commit status — e.g. Travis-CI and Coveralls. I read that a deployment cannot be created unless these are successful.

My current course of action is to keep listening to events (via webhook) and to re-fire my “create deployment” call each time I receive an event with {"commit": {"state": "success"}, ...} until it hopefully creates my deployment. Is there a more general event I could listen to? One that says, “every additional check is green”.