dwyl / dwylbot

:robot: Automating our GitHub Workflow to improve team communication/collaboration and reduce tedious repetition!
28 stars 7 forks source link

check failing test when awaiting-review label added #126

Open SimonLab opened 7 years ago

SimonLab commented 7 years ago

linked to https://github.com/dwyl/dwylbot/issues/65#issuecomment-310347068

The rule #65 (check failing tests) is triggered when a event "status" is sent by Github, which means when the tests have just finished to run.

This rule will check for failing test when a the "awaiting-review" is added to the PR

naazy commented 7 years ago

When the 'awaiting-review' label is added, we don't actually know if CI has failed because this info is not sent in the payload. I think we will have to make a travis/circle API request here

ghost commented 7 years ago

@naazy how does someone use Travis? Does it have to be added as an app to the GitHub repo? Maybe dwylbot could also automatically install it, like it does with the dwyl labels?

naazy commented 7 years ago

Some repos have Travis configured to run their tests @markwilliamfirth. We could make a direct request to the travis API to find out if the tests are passing before adding the awaiting-review label. However the issue here is that we do not always know that a repo is using Travis. For example they could be using Circle CI. Github automatically sends a message to Dwylbot when tests pass or fail. However when a reviewer is added to a PR, github does not send the test status in the payload to Dwylbot. Therefore another option here could be to just save in the db whether or not the tests have passed/failed. Thoughts on the best approach here @SimonLab ?

iteles commented 7 years ago

@markwilliamfirth https://github.com/dwyl/learn-travis