diff options
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}") |