diff options
Diffstat (limited to 'lib/bitbucket_server/representation/comment.rb')
-rw-r--r-- | lib/bitbucket_server/representation/comment.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/bitbucket_server/representation/comment.rb b/lib/bitbucket_server/representation/comment.rb index 99b97a3b181..fdd8316cc6b 100644 --- a/lib/bitbucket_server/representation/comment.rb +++ b/lib/bitbucket_server/representation/comment.rb @@ -34,19 +34,19 @@ module BitbucketServer end def id - raw_comment['id'] + raw_comment["id"] end def author_username - author['displayName'] + author["displayName"] end def author_email - author['emailAddress'] + author["emailAddress"] end def note - raw_comment['text'] + raw_comment["text"] end def created_at @@ -85,7 +85,7 @@ module BitbucketServer # insert that node into the workset. # b. Parse that note into a Comment structure and add it to a flat list. def flatten_comments - comments = raw_comment['comments'] + comments = raw_comment["comments"] workset = if comments [CommentNode.new(comments, self)] @@ -100,8 +100,8 @@ module BitbucketServer parent = node.parent node.raw_comments.each do |comment| - new_comments = comment.delete('comments') - current_comment = Comment.new({ 'comment' => comment }, parent_comment: parent) + new_comments = comment.delete("comments") + current_comment = Comment.new({"comment" => comment}, parent_comment: parent) all_comments << current_comment workset << CommentNode.new(new_comments, current_comment) if new_comments end @@ -111,19 +111,19 @@ module BitbucketServer end def raw_comment - raw.fetch('comment', {}) + raw.fetch("comment", {}) end def author - raw_comment['author'] + raw_comment["author"] end def created_date - raw_comment['createdDate'] + raw_comment["createdDate"] end def updated_date - raw_comment['updatedDate'] + raw_comment["updatedDate"] end end end |