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
cf886916
Commit
cf886916
authored
Jan 31, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
a6141c13
aa4cb474
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 @
cf886916
---
title
:
Add repositories count to usage ping data
merge_request
:
24823
author
:
type
:
added
lib/gitlab/usage_data.rb
View file @
cf886916
...
@@ -83,6 +83,7 @@ module Gitlab
...
@@ -83,6 +83,7 @@ module Gitlab
pages_domains:
count
(
PagesDomain
),
pages_domains:
count
(
PagesDomain
),
projects:
count
(
Project
),
projects:
count
(
Project
),
projects_imported_from_github:
count
(
Project
.
where
(
import_type:
'github'
)),
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
),
protected_branches:
count
(
ProtectedBranch
),
releases:
count
(
Release
),
releases:
count
(
Release
),
remote_mirrors:
count
(
RemoteMirror
),
remote_mirrors:
count
(
RemoteMirror
),
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
cf886916
...
@@ -27,6 +27,8 @@ describe Gitlab::UsageData do
...
@@ -27,6 +27,8 @@ describe Gitlab::UsageData do
create
(
:clusters_applications_prometheus
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_prometheus
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_runner
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_runner
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_knative
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_knative
,
:installed
,
cluster:
gcp_cluster
)
ProjectFeature
.
first
.
update_attribute
(
'repository_access_level'
,
0
)
end
end
subject
{
described_class
.
data
}
subject
{
described_class
.
data
}
...
@@ -113,6 +115,7 @@ describe Gitlab::UsageData do
...
@@ -113,6 +115,7 @@ describe Gitlab::UsageData do
projects_slack_notifications_active
projects_slack_notifications_active
projects_slack_slash_active
projects_slack_slash_active
projects_prometheus_active
projects_prometheus_active
projects_with_repositories_enabled
pages_domains
pages_domains
protected_branches
protected_branches
releases
releases
...
@@ -135,6 +138,7 @@ describe Gitlab::UsageData do
...
@@ -135,6 +138,7 @@ describe Gitlab::UsageData do
expect
(
count_data
[
:projects_jira_cloud_active
]).
to
eq
(
1
)
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_notifications_active
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_slack_slash_active
]).
to
eq
(
1
)
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
[
:clusters_enabled
]).
to
eq
(
7
)
expect
(
count_data
[
:project_clusters_enabled
]).
to
eq
(
6
)
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