diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-06-07 19:13:26 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-06-14 12:36:27 +0200 |
commit | b6ff5f1e141162e701c33647aae5015e5d42cc11 (patch) | |
tree | fb6ec57e96dc811d07c75d6b32f9471263c85166 /lib | |
parent | 8934ddbb47d24dac937351588bc28551bd7654e7 (diff) | |
download | gitlab-ce-b6ff5f1e141162e701c33647aae5015e5d42cc11.tar.gz |
Expose comments on Noteables in GraphQL
This exposes `Note`s on Issues & MergeRequests using a
`Types::Notes::NoteableType` in GraphQL.
Exposing notes on a new type can be done by implementing the
`NoteableType` interface on the type. The presented object should
be a `Noteable`.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/position.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/diff/position.rb b/lib/gitlab/diff/position.rb index e8f98f52111..d349c378e53 100644 --- a/lib/gitlab/diff/position.rb +++ b/lib/gitlab/diff/position.rb @@ -134,6 +134,14 @@ module Gitlab @line_code ||= diff_file(repository)&.line_code_for_position(self) end + def on_image? + position_type == 'image' + end + + def on_text? + position_type == 'text' + end + private def find_diff_file(repository) |