Notify when the upstream commit/merge that you built on top of is failing

Notify when the upstream commit/merge that you built on top of is failing.

Repos have different policies concerning the master branch. It seems that many repos now use master as just another staging branch and if you fetch from the upstream master then build on top of it - you basically pulled in a stale/failing version. Maybe you can mitigate this by informing the user that they are working off a failing commit/merge to begin with.

It would be an added benefit if you could integrate this also into the command line utility.

$ travis check upstream

The command could check the upstream commit and see if it is passing and maybe suggest a new base for a passing commit/merge.

Extra points if you print out the git command that will rebase - so we can just copy and paste.

Note that this is only possible for PR builds – for pushes, Github doesn’t provide upstream information in webhook notification. Base commit ID is available in pull_request event payload as ['pull_request']['base']['sha'].

I think a link to the build for the upstream commit in web UI would do. It could e.g. be a status badge next to the upstream branch.
I don’t know however:

  • whether we should still link if the upstream is a private repo and/or if it’s technically possible to find this out without Github API requests (which are rate-limited so we really don’t want to use them as part of regular build logic)
  • whether it’s techniccally possible to display that build’s status and update it (because that build could very well be in progress or be restarted).