diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-22 16:10:29 -0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-11-21 16:47:26 -0800 |
commit | 3f59d25d263d1ac9db76cd2d3d4d025fb6d6dff4 (patch) | |
tree | 27c0f9437d8f4c257ea49e3e208be1c5d4699c52 /lib/bitbucket/client.rb | |
parent | 3dd15d3f753a5a71522275a37393bfa56d6e3517 (diff) | |
download | gitlab-ce-3f59d25d263d1ac9db76cd2d3d4d025fb6d6dff4.tar.gz |
Add an endpoint to get a list of issue comments
Diffstat (limited to 'lib/bitbucket/client.rb')
-rw-r--r-- | lib/bitbucket/client.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/bitbucket/client.rb b/lib/bitbucket/client.rb index ac6e91bb526..3d22347603d 100644 --- a/lib/bitbucket/client.rb +++ b/lib/bitbucket/client.rb @@ -11,6 +11,16 @@ module Bitbucket Collection.new(paginator) end + def issue_comments(repo, number) + relative_path = "/repositories/#{repo}/issues/#{number}/comments" + paginator = Paginator.new(connection, relative_path, :url) + + Collection.new(paginator).map do |comment_url| + parsed_response = connection.get(comment_url.to_s) + Representation::Comment.new(parsed_response) + end + end + def repo(name) parsed_response = connection.get("/repositories/#{name}") |