From 563c1ca01cf94e125a5d01669e6e8455da257246 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Tue, 30 May 2017 23:38:06 +0300 Subject: Fix: A diff comment on a change at last line of a file shows as two comments in discussion --- lib/gitlab/diff/line.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/gitlab/diff/line.rb b/lib/gitlab/diff/line.rb index 0a15c6d9358..bd52ae47e9f 100644 --- a/lib/gitlab/diff/line.rb +++ b/lib/gitlab/diff/line.rb @@ -59,6 +59,10 @@ module Gitlab type == 'match' end + def discussable? + !['match', 'new-nonewline', 'old-nonewline'].include?(type) + end + def as_json(opts = nil) { type: type, -- cgit v1.2.1