lib/travis/travis.rb
def branch_build_successful?
    Log.fatal('Cannot determine if branch build was successful if not running on a pull request') unless TravisCI.pull_request?

    travis_repo = repo
    original_branch = ENV['TRAVIS_PULL_REQUEST_BRANCH']

    travis_repo.branch(original_branch).green?
  end
# If the current job is a pull request, this will determine if the previous build for the current branch was successful or not.
# Note: An exception will be thrown if not in a pull request.
If the current job is a pull request, this will determine if the previous build for the current branch was successful or not.
Note: An exception will be thrown if not in a pull request.
If the current job is a pull request this will determine if the previous build for the current branch was successful or not . Note : An exception will be thrown if not in a pull request .
def branch_build_successful?
    Log.fatal('Cannot determine if branch build was successful if not running on a pull request') unless TravisCI.pull_request?
    travis_repo = repo
    original_branch = ENV['TRAVIS_PULL_REQUEST_BRANCH']
    travis_repo.branch(original_branch).green?
  end
def branch_build_successful? Log . fatal ( 'Cannot determine if branch build was successful if not running on a pull request' ) unless TravisCI . pull_request? travis_repo = repo original_branch = ENV [ 'TRAVIS_PULL_REQUEST_BRANCH' ] travis_repo . branch ( original_branch ) . green? end
If the current job is a pull request, this will determine if the previous build for the current branch was successful or not.
If the current job is a pull request this will determine if the previous build for the current branch was successful or not .