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
0aaa3d13
Commit
0aaa3d13
authored
Jun 21, 2021
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user/namespace and project in tracking calls
parent
8392eb0f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
8 deletions
+9
-8
app/graphql/mutations/concerns/mutations/package_eventable.rb
...graphql/mutations/concerns/mutations/package_eventable.rb
+1
-1
lib/gitlab/database_importers/instance_administrators/create_group.rb
...atabase_importers/instance_administrators/create_group.rb
+1
-1
lib/gitlab/database_importers/self_monitoring/project/create_service.rb
...abase_importers/self_monitoring/project/create_service.rb
+2
-1
spec/lib/gitlab/database_importers/instance_administrators/create_group_spec.rb
...se_importers/instance_administrators/create_group_spec.rb
+2
-2
spec/lib/gitlab/database_importers/self_monitoring/project/create_service_spec.rb
..._importers/self_monitoring/project/create_service_spec.rb
+3
-3
No files found.
app/graphql/mutations/concerns/mutations/package_eventable.rb
View file @
0aaa3d13
...
...
@@ -8,7 +8,7 @@ module Mutations
def
track_event
(
event
,
scope
)
::
Packages
::
CreateEventService
.
new
(
nil
,
current_user
,
event_name:
event
,
scope:
scope
).
execute
::
Gitlab
::
Tracking
.
event
(
event
.
to_s
,
scope
.
to_s
)
::
Gitlab
::
Tracking
.
event
(
event
.
to_s
,
scope
.
to_s
,
user:
current_user
)
end
end
end
lib/gitlab/database_importers/instance_administrators/create_group.rb
View file @
0aaa3d13
...
...
@@ -89,7 +89,7 @@ module Gitlab
end
def
track_event
(
result
)
::
Gitlab
::
Tracking
.
event
(
"instance_administrators_group"
,
"group_created"
)
::
Gitlab
::
Tracking
.
event
(
"instance_administrators_group"
,
"group_created"
,
namespace:
result
[
:group
]
)
success
(
result
)
end
...
...
lib/gitlab/database_importers/self_monitoring/project/create_service.rb
View file @
0aaa3d13
...
...
@@ -118,7 +118,8 @@ module Gitlab
end
def
track_event
(
result
)
::
Gitlab
::
Tracking
.
event
(
"self_monitoring"
,
"project_created"
)
project
=
result
[
:project
]
::
Gitlab
::
Tracking
.
event
(
"self_monitoring"
,
"project_created"
,
project:
project
,
namespace:
project
.
namespace
)
success
(
result
)
end
...
...
spec/lib/gitlab/database_importers/instance_administrators/create_group_spec.rb
View file @
0aaa3d13
...
...
@@ -56,10 +56,10 @@ RSpec.describe Gitlab::DatabaseImporters::InstanceAdministrators::CreateGroup do
it
"tracks successful install"
do
expect
(
::
Gitlab
::
Tracking
).
to
receive
(
:event
).
with
(
'instance_administrators_group'
,
'group_created'
'instance_administrators_group'
,
'group_created'
,
namespace:
group
)
result
subject
.
execute
end
it
'creates group'
do
...
...
spec/lib/gitlab/database_importers/self_monitoring/project/create_service_spec.rb
View file @
0aaa3d13
...
...
@@ -86,10 +86,10 @@ RSpec.describe Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService
end
it
"tracks successful install"
do
expect
(
::
Gitlab
::
Tracking
).
to
receive
(
:event
).
twice
expect
(
::
Gitlab
::
Tracking
).
to
receive
(
:event
).
with
(
'self_monitoring'
,
'project_created'
)
expect
(
::
Gitlab
::
Tracking
).
to
receive
(
:event
).
with
(
"instance_administrators_group"
,
"group_created"
,
namespace:
project
.
namespace
)
expect
(
::
Gitlab
::
Tracking
).
to
receive
(
:event
).
with
(
'self_monitoring'
,
'project_created'
,
project:
project
,
namespace:
project
.
namespace
)
result
subject
.
execute
end
it
'creates group'
do
...
...
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