Commit 699183fa authored by Pavel Shutsin's avatar Pavel Shutsin

Allow custom bot types

parent 66acda99
......@@ -10,10 +10,9 @@ module EE
override :bots
def bots
# When adding a new key, please ensure you are not redefining a key that already exists in app/models/user_bot_types_enums.rb
super.merge(
support_bot: 1,
visual_review_bot: 3
)
bots_hash = super.merge(support_bot: 1, visual_review_bot: 3)
bots_hash[:custom] = 99 if ::Gitlab.com?
bots_hash
end
end
end
......
......@@ -19,7 +19,9 @@ module Analytics
# rubocop: disable CodeReuse/ActiveRecord
def first_comment_at
merge_request.related_notes.by_humans.where.not(author_id: merge_request.author_id).fresh.first&.created_at
merge_request.related_notes.by_humans
.where.not(author_id: merge_request.author_id)
.fresh.first&.created_at
end
# rubocop: enable CodeReuse/ActiveRecord
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment