diff options
author | Stan Hu <stanhu@gmail.com> | 2016-11-17 21:30:35 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-11-21 16:47:29 -0800 |
commit | 9e6b25d0bc5c2f88330bb074db242017ea45f90d (patch) | |
tree | 92aed159f5a99f96788db567bfa22743833cbdb6 /lib/bitbucket | |
parent | b8bf28348fb903c62e084353896873438f4f0845 (diff) | |
download | gitlab-ce-9e6b25d0bc5c2f88330bb074db242017ea45f90d.tar.gz |
Add support for extracting all pull requests and their raw diffs
Diffstat (limited to 'lib/bitbucket')
-rw-r--r-- | lib/bitbucket/client.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bitbucket/client.rb b/lib/bitbucket/client.rb index fce1c898030..0d4cfd600b8 100644 --- a/lib/bitbucket/client.rb +++ b/lib/bitbucket/client.rb @@ -22,7 +22,7 @@ module Bitbucket end def pull_requests(repo) - relative_path = "/repositories/#{repo}/pullrequests" + relative_path = "/repositories/#{repo}/pullrequests?state=ALL" paginator = Paginator.new(connection, relative_path, :pull_request) Collection.new(paginator) @@ -35,6 +35,12 @@ module Bitbucket Collection.new(paginator) end + def pull_request_diff(repo, pull_request) + relative_path = "/repositories/#{repo}/pullrequests/#{pull_request}/diff" + + connection.get(relative_path) + end + def repo(name) parsed_response = connection.get("/repositories/#{name}") Representation::Repo.new(parsed_response) |