I would suggest reversing this logic.  So:
```java
if (build.getResult() == Result.SUCCESS || repo.isAutoCloseFailedPullRequests()) {
   repo.closePullRequest(pull);
}
```

Seems more readable to me.  But that may be just personal preference.