Commit 9e6b25d0 authored by Stan Hu's avatar Stan Hu
Browse files

Add support for extracting all pull requests and their raw diffs

parent 2189e828fa84
......@@ -22,7 +22,7 @@ def issue_comments(repo, number)
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 @@ def pull_request_comments(repo, pull_request)
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)
......
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