Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
699183fa
Commit
699183fa
authored
Feb 11, 2020
by
Pavel Shutsin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow custom bot types
parent
66acda99
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
ee/app/models/ee/user_bot_type_enums.rb
ee/app/models/ee/user_bot_type_enums.rb
+3
-4
ee/lib/analytics/productivity_calculator.rb
ee/lib/analytics/productivity_calculator.rb
+3
-1
No files found.
ee/app/models/ee/user_bot_type_enums.rb
View file @
699183fa
...
...
@@ -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
...
...
ee/lib/analytics/productivity_calculator.rb
View file @
699183fa
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment