Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bitbucket_server/representation')
-rw-r--r--lib/bitbucket_server/representation/comment.rb2
-rw-r--r--lib/bitbucket_server/representation/pull_request_comment.rb19
-rw-r--r--lib/bitbucket_server/representation/repo.rb2
3 files changed, 10 insertions, 13 deletions
diff --git a/lib/bitbucket_server/representation/comment.rb b/lib/bitbucket_server/representation/comment.rb
index 07a8b359db7..44f76139fc4 100644
--- a/lib/bitbucket_server/representation/comment.rb
+++ b/lib/bitbucket_server/representation/comment.rb
@@ -55,7 +55,7 @@ module BitbucketServer
comments.each do |comment|
new_comments = comment.delete('comments')
workset << new_comments if new_comments
- all_comments << Comment.new({ 'comment' => comment})
+ all_comments << Comment.new({ 'comment' => comment })
end
end
diff --git a/lib/bitbucket_server/representation/pull_request_comment.rb b/lib/bitbucket_server/representation/pull_request_comment.rb
index 3763ba13816..c7d08e604fd 100644
--- a/lib/bitbucket_server/representation/pull_request_comment.rb
+++ b/lib/bitbucket_server/representation/pull_request_comment.rb
@@ -35,7 +35,7 @@ module BitbucketServer
end
def added?
- line_type == 'ADDED'
+ line_type == 'ADDED'
end
def removed?
@@ -67,17 +67,16 @@ module BitbucketServer
end
def line_position
- @line_position ||=
- diff_hunks.each do |hunk|
- segments = hunk.fetch('segments', [])
- segments.each do |segment|
- lines = segment.fetch('lines', [])
- lines.each do |line|
- if line['commentIds']&.include?(id)
- return [line['source'], line['destination']]
- end
+ @line_position ||= diff_hunks.each do |hunk|
+ segments = hunk.fetch('segments', [])
+ segments.each do |segment|
+ lines = segment.fetch('lines', [])
+ lines.each do |line|
+ if line['commentIds']&.include?(id)
+ return [line['source'], line['destination']]
end
end
+ end
end
end
diff --git a/lib/bitbucket_server/representation/repo.rb b/lib/bitbucket_server/representation/repo.rb
index 38778645966..2f3a60b204b 100644
--- a/lib/bitbucket_server/representation/repo.rb
+++ b/lib/bitbucket_server/representation/repo.rb
@@ -1,8 +1,6 @@
module BitbucketServer
module Representation
class Repo < Representation::Base
- attr_reader :owner, :slug
-
def initialize(raw)
super(raw)
end