Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
232a7a36
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
232a7a36
编写于
1月 31, 2019
作者:
B
Balasankar "Balu" C
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add number of repositories to usage ping data
上级
6da156ab
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
0 deletion
+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
未找到文件。
changelogs/unreleased/45791-number-of-repositories-usage-ping.yml
0 → 100644
浏览文件 @
232a7a36
---
title
:
Add repositories count to usage ping data
merge_request
:
24823
author
:
type
:
added
lib/gitlab/usage_data.rb
浏览文件 @
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
浏览文件 @
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
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录