Commit 1b223e92 authored by James Lopez's avatar James Lopez

Merge branch '202680-allow-users-to-be-marked-as-bots' into 'master'

Allow custom bot types

Closes #202680

See merge request gitlab-org/gitlab!24852
parents 0ad2e198 699183fa
...@@ -10,10 +10,9 @@ module EE ...@@ -10,10 +10,9 @@ module EE
override :bots override :bots
def 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 # 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( bots_hash = super.merge(support_bot: 1, visual_review_bot: 3)
support_bot: 1, bots_hash[:custom] = 99 if ::Gitlab.com?
visual_review_bot: 3 bots_hash
)
end end
end end
end end
......
...@@ -19,7 +19,9 @@ module Analytics ...@@ -19,7 +19,9 @@ module Analytics
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def first_comment_at 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 end
# rubocop: enable CodeReuse/ActiveRecord # 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