Commit 64722a15 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre Committed by Stan Hu

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

parent 317b0209
...@@ -21,6 +21,12 @@ module Bitbucket ...@@ -21,6 +21,12 @@ module Bitbucket
end end
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) def repo(name)
parsed_response = connection.get("/repositories/#{name}") parsed_response = connection.get("/repositories/#{name}")
......
module Bitbucket
module Representation
class PullRequest < Representation::Base
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment