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
232a7a36
Commit
232a7a36
authored
Jan 31, 2019
by
Balasankar "Balu" C
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add number of repositories to usage ping data
parent
6da156ab
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
changelogs/unreleased/45791-number-of-repositories-usage-ping.yml
...gs/unreleased/45791-number-of-repositories-usage-ping.yml
+5
-0
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+4
-0
No files found.
changelogs/unreleased/45791-number-of-repositories-usage-ping.yml
0 → 100644
View file @
232a7a36
---
title
:
Add repositories count to usage ping data
merge_request
:
24823
author
:
type
:
added
lib/gitlab/usage_data.rb
View file @
232a7a36
...
...
@@ -81,6 +81,7 @@ module Gitlab
pages_domains:
count
(
PagesDomain
),
projects:
count
(
Project
),
projects_imported_from_github:
count
(
Project
.
where
(
import_type:
'github'
)),
projects_with_repositories_enabled:
count
(
ProjectFeature
.
where
(
'repository_access_level > ?'
,
ProjectFeature
::
DISABLED
)),
protected_branches:
count
(
ProtectedBranch
),
releases:
count
(
Release
),
remote_mirrors:
count
(
RemoteMirror
),
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
232a7a36
...
...
@@ -26,6 +26,8 @@ describe Gitlab::UsageData do
create
(
:clusters_applications_prometheus
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_runner
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_knative
,
:installed
,
cluster:
gcp_cluster
)
ProjectFeature
.
first
.
update_attribute
(
'repository_access_level'
,
0
)
end
subject
{
described_class
.
data
}
...
...
@@ -112,6 +114,7 @@ describe Gitlab::UsageData do
projects_slack_notifications_active
projects_slack_slash_active
projects_prometheus_active
projects_with_repositories_enabled
pages_domains
protected_branches
releases
...
...
@@ -134,6 +137,7 @@ describe Gitlab::UsageData do
expect
(
count_data
[
:projects_jira_cloud_active
]).
to
eq
(
1
)
expect
(
count_data
[
:projects_slack_notifications_active
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_slack_slash_active
]).
to
eq
(
1
)
expect
(
count_data
[
:projects_with_repositories_enabled
]).
to
eq
(
2
)
expect
(
count_data
[
:clusters_enabled
]).
to
eq
(
7
)
expect
(
count_data
[
:project_clusters_enabled
]).
to
eq
(
6
)
...
...
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