I'm not sure if this is right. This is the most recently created build, but it could be a PR build, it could be a branch build, etc. If we are to use this as some query for when to set the repository status, I think it should find the "latest build that is on the default branch and isn't a pull request build. Then it would look something like this, I think:

``` Ruby
repository.builds.where(branch: repository.default_branch, event_type: "push").last.id
```

In that case, the method should probably be renamed too.