lib/travis/client/build.rb in travis-1.5.6.travis.303.4 vs lib/travis/client/build.rb in travis-1.5.6.travis.304.4
- old
+ new
@@ -3,28 +3,25 @@
module Travis
module Client
class Build < Entity
include States, Restartable
- # @!parse attr_reader :repository_id, :commit_id, :number, :pull_request, :config, :state, :started_at, :finished_at, :duration, :job_ids
- attributes :repository_id, :commit_id, :number, :pull_request, :config, :state, :started_at, :finished_at, :duration, :job_ids
+ # @!parse attr_reader :repository_id, :commit_id, :number, :pull_request, :pull_request_number, :pull_request_title, :config, :state, :started_at, :finished_at, :duration, :job_ids
+ attributes :repository_id, :commit_id, :number, :pull_request, :pull_request_number, :pull_request_title, :config, :state, :started_at, :finished_at, :duration, :job_ids
time :started_at, :finished_at
alias pull_request? pull_request
+ alias pr_number pull_request_number
# @!parse attr_reader :repository, :commit, :jobs
has :repository, :commit, :jobs
one :build
many :builds
aka :branch, :branches
def push?
not pull_request?
- end
-
- def pr_number
- commit.compare_url[/\d+$/] if pull_request?
end
def branch_info
pull_request? ? "Pull Request ##{pr_number}" : commit.branch
end