Add an endpoint to get a list of pull requests for a repo

This commit is contained in:
Douglas Barbosa Alexandre 2016-08-22 16:15:15 -03:00 committed by Stan Hu
parent 317b020932
commit 64722a15e3
2 changed files with 12 additions and 0 deletions

View File

@ -21,6 +21,12 @@ module Bitbucket
end
end
def pull_requests(repo)
relative_path = "/repositories/#{repo}/pullrequests"
paginator = Paginator.new(connection, relative_path, :pull_request)
Collection.new(paginator)
end
def repo(name)
parsed_response = connection.get("/repositories/#{name}")

View File

@ -0,0 +1,6 @@
module Bitbucket
module Representation
class PullRequest < Representation::Base
end
end
end