travis-ci/travis-core — pull request #316 by drogus (2013-12-23 10:31:18+00:00)
Title: Add find_requests service and requests API data

From commit message:

```At the moment we don't do a great job when it comes to communicating
what's going on under the hood when you push a build to github - it
either shows on the builds list or not. In the latter case users may be
left in the dark, which I suspect may be more common in the future, when
we move such things like "exclude branch" to the repository settings
pane.

This commit reveals part of the request data, which we can use to show
what did we get from github and if it was accepted.
```

I've discussed doing this with @joshk a while ago and we decided to keep it simple, ie. reuse information we already have. This has a small drawback - we don't always create a request object out of the github payload. However, this situation is rather uncommon (or, well, it will be, I found out that my addition of `settings.build_pushes?` check also prevents creating request, because it's used here: https://github.com/travis-ci/travis-core/blob/74c44d2d83806c2ded38acebca8430c9975f2859/lib/travis/requests/services/receive/push.rb#L16, this needs to be moved to `Approval`). That's why I think that it's the best thing we can do at the moment to not waste time for building yet another abstraction.