Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
0bfb6245
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 搜索 >>
提交
0bfb6245
编写于
8月 19, 2020
作者:
G
GitLab Bot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add latest changes from gitlab-org/gitlab@master
上级
7fdacd20
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
311 addition
and
188 deletion
+311
-188
.rubocop.yml
.rubocop.yml
+4
-1
.rubocop_todo.yml
.rubocop_todo.yml
+162
-2
app/assets/javascripts/boards/components/board_content.vue
app/assets/javascripts/boards/components/board_content.vue
+60
-8
app/assets/javascripts/boards/components/board_content_layout.vue
...ts/javascripts/boards/components/board_content_layout.vue
+0
-50
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+1
-1
app/helpers/notes_helper.rb
app/helpers/notes_helper.rb
+8
-6
changelogs/unreleased/sh-fix-time-zones.yml
changelogs/unreleased/sh-fix-time-zones.yml
+5
-0
config/initializers/time_zone.rb
config/initializers/time_zone.rb
+7
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+10
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+28
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+2
-0
doc/development/telemetry/snowplow.md
doc/development/telemetry/snowplow.md
+10
-6
lib/api/issues.rb
lib/api/issues.rb
+1
-1
lib/api/users.rb
lib/api/users.rb
+1
-1
lib/gitlab/incident_management/pager_duty/incident_issue_description.rb
...ident_management/pager_duty/incident_issue_description.rb
+1
-1
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-1
lib/gitlab/utils/usage_data.rb
lib/gitlab/utils/usage_data.rb
+1
-1
spec/frontend/boards/components/board_content_layout_spec.js
spec/frontend/boards/components/board_content_layout_spec.js
+0
-66
spec/frontend/boards/components/board_content_spec.js
spec/frontend/boards/components/board_content_spec.js
+0
-40
spec/lib/gitlab/alerting/alert_spec.rb
spec/lib/gitlab/alerting/alert_spec.rb
+2
-2
spec/lib/gitlab/utils/usage_data_spec.rb
spec/lib/gitlab/utils/usage_data_spec.rb
+1
-1
spec/requests/api/issues/issues_spec.rb
spec/requests/api/issues/issues_spec.rb
+6
-0
未找到文件。
.rubocop.yml
浏览文件 @
0bfb6245
...
...
@@ -470,8 +470,10 @@ Rails/TimeZone:
Include
:
-
'
app/controllers/**/*'
-
'
app/services/**/*'
-
'
lib/**/*'
-
'
spec/controllers/**/*'
-
'
spec/services/**/*'
-
'
spec/lib/**/*'
-
'
ee/app/controllers/**/*'
-
'
ee/app/services/**/*'
-
'
ee/spec/controllers/**/*'
...
...
@@ -484,7 +486,8 @@ Rails/TimeZone:
-
'
spec/workers/**/*'
-
'
ee/app/workers/**/*'
-
'
ee/spec/workers/**/*'
-
'
ee/lib/**/*'
-
'
ee/spec/lib/**/*'
# WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040
Rails/SaveBang
:
...
...
.rubocop_todo.yml
浏览文件 @
0bfb6245
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-0
5-20 16:32:14 -04
00 using RuboCop version 0.82.0.
# `rubocop --auto-gen-config
--exclude-limit 10000
`
# on 2020-0
8-17 21:05:54 +12
00 using RuboCop version 0.82.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
...
...
@@ -448,6 +448,166 @@ Rails/RakeEnvironment:
Rails/SkipsModelValidations
:
Enabled
:
false
# Offense count: 308
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: strict, flexible
Rails/TimeZone
:
Enabled
:
true
Exclude
:
-
'
lib/gitlab/popen.rb'
-
'
ee/lib/delay.rb'
-
'
ee/lib/gitlab/elastic/helper.rb'
-
'
ee/lib/gitlab/elastic/indexer.rb'
-
'
ee/lib/gitlab/geo/base_request.rb'
-
'
ee/lib/gitlab/geo/event_gap_tracking.rb'
-
'
ee/lib/gitlab/geo/log_cursor/events/design_repository_updated_event.rb'
-
'
ee/lib/gitlab/geo/log_cursor/events/repository_updated_event.rb'
-
'
ee/lib/gitlab/geo/log_cursor/logger.rb'
-
'
ee/lib/gitlab/geo/oauth/login_state.rb'
-
'
ee/lib/gitlab/prometheus/queries/cluster_query.rb'
-
'
ee/lib/gitlab/prometheus/queries/packet_flow_query.rb'
-
'
ee/spec/lib/ee/gitlab/checks/push_rules/commit_check_spec.rb'
-
'
ee/spec/lib/ee/gitlab/ci/pipeline/quota/job_activity_spec.rb'
-
'
ee/spec/lib/gitlab/analytics/cycle_analytics/data_collector_spec.rb'
-
'
ee/spec/lib/gitlab/analytics/cycle_analytics/summary/group/stage_summary_spec.rb'
-
'
ee/spec/lib/gitlab/analytics/cycle_analytics/summary/group/stage_time_summary_spec.rb'
-
'
ee/spec/lib/gitlab/auth/ldap/access_spec.rb'
-
'
ee/spec/lib/gitlab/auth/smartcard/san_extension_spec.rb'
-
'
ee/spec/lib/gitlab/auth/smartcard/session_spec.rb'
-
'
ee/spec/lib/gitlab/background_migration/fix_orphan_promoted_issues_spec.rb'
-
'
ee/spec/lib/gitlab/ci/pipeline/chain/limit/job_activity_spec.rb'
-
'
ee/spec/lib/gitlab/elastic/client_spec.rb'
-
'
ee/spec/lib/gitlab/geo/base_request_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/cache_invalidation_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/container_repository_updated_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/design_repository_updated_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/hashed_storage_attachments_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/hashed_storage_migrated_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/job_artifact_deleted_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/lfs_object_deleted_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/repositories_changed_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/repository_created_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/repository_deleted_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/repository_renamed_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/repository_updated_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/reset_checksum_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/events/upload_deleted_event_spec.rb'
-
'
ee/spec/lib/gitlab/geo/log_cursor/logger_spec.rb'
-
'
ee/spec/lib/gitlab/git_access_spec.rb'
-
'
ee/spec/lib/gitlab/prometheus/queries/additional_metrics_deployment_query_spec.rb'
-
'
ee/spec/lib/gitlab/prometheus/queries/cluster_query_spec.rb'
-
'
ee/spec/lib/gitlab/prometheus/queries/packet_flow_query_spec.rb'
-
'
lib/api/helpers.rb'
-
'
lib/api/sidekiq_metrics.rb'
-
'
lib/backup/manager.rb'
-
'
lib/bitbucket_server/representation/base.rb'
-
'
lib/gitlab/auth/current_user_mode.rb'
-
'
lib/gitlab/auth/ldap/access.rb'
-
'
lib/gitlab/chaos.rb'
-
'
lib/gitlab/checks/timed_logger.rb'
-
'
lib/gitlab/ci/ansi2json/line.rb'
-
'
lib/gitlab/ci/pipeline/chain/sequence.rb'
-
'
lib/gitlab/ci/pipeline/duration.rb'
-
'
lib/gitlab/cycle_analytics/summary/deployment_frequency.rb'
-
'
lib/gitlab/database.rb'
-
'
lib/gitlab/external_authorization/access.rb'
-
'
lib/gitlab/external_authorization/cache.rb'
-
'
lib/gitlab/gitaly_client.rb'
-
'
lib/gitlab/gitaly_client/ref_service.rb'
-
'
lib/gitlab/github_import/representation.rb'
-
'
lib/gitlab/grape_logging/loggers/queue_duration_logger.rb'
-
'
lib/gitlab/health_checks/base_abstract_check.rb'
-
'
lib/gitlab/import_export.rb'
-
'
lib/gitlab/instrumentation/elasticsearch_transport.rb'
-
'
lib/gitlab/instrumentation/redis_interceptor.rb'
-
'
lib/gitlab/instrumentation_helper.rb'
-
'
lib/gitlab/kubernetes/helm/certificate.rb'
-
'
lib/gitlab/lfs_token.rb'
-
'
lib/gitlab/loop_helpers.rb'
-
'
lib/gitlab/phabricator_import/representation/task.rb'
-
'
lib/gitlab/prometheus/queries/additional_metrics_environment_query.rb'
-
'
lib/gitlab/prometheus/queries/matched_metric_query.rb'
-
'
lib/gitlab/prometheus_client.rb'
-
'
lib/gitlab/sherlock/transaction.rb'
-
'
lib/gitlab/task_helpers.rb'
-
'
lib/gitlab/x509/tag.rb'
-
'
lib/grafana/time_window.rb'
-
'
lib/json_web_token/token.rb'
-
'
lib/object_storage/direct_upload.rb'
-
'
lib/quality/seeders/issues.rb'
-
'
lib/rspec_flaky/flaky_example.rb'
-
'
lib/rspec_flaky/report.rb'
-
'
lib/tasks/gitlab/assets.rake'
-
'
lib/tasks/gitlab/backup.rake'
-
'
lib/tasks/gitlab/cleanup.rake'
-
'
lib/tasks/gitlab/list_repos.rake'
-
'
spec/lib/api/helpers_spec.rb'
-
'
spec/lib/gitlab/analytics/cycle_analytics/base_query_builder_spec.rb'
-
'
spec/lib/gitlab/app_json_logger_spec.rb'
-
'
spec/lib/gitlab/app_text_logger_spec.rb'
-
'
spec/lib/gitlab/auth/current_user_mode_spec.rb'
-
'
spec/lib/gitlab/background_migration/recalculate_project_authorizations_spec.rb'
-
'
spec/lib/gitlab/background_migration/wrongfully_confirmed_email_unconfirmer_spec.rb'
-
'
spec/lib/gitlab/bitbucket_import/importer_spec.rb'
-
'
spec/lib/gitlab/bitbucket_server_import/importer_spec.rb'
-
'
spec/lib/gitlab/checks/timed_logger_spec.rb'
-
'
spec/lib/gitlab/ci/cron_parser_spec.rb'
-
'
spec/lib/gitlab/cycle_analytics/stage_summary_spec.rb'
-
'
spec/lib/gitlab/cycle_analytics/usage_data_spec.rb'
-
'
spec/lib/gitlab/data_builder/note_spec.rb'
-
'
spec/lib/gitlab/database/background_migration_job_spec.rb'
-
'
spec/lib/gitlab/database_spec.rb'
-
'
spec/lib/gitlab/discussions_diff/file_collection_spec.rb'
-
'
spec/lib/gitlab/external_authorization/access_spec.rb'
-
'
spec/lib/gitlab/external_authorization/cache_spec.rb'
-
'
spec/lib/gitlab/external_authorization/logger_spec.rb'
-
'
spec/lib/gitlab/fogbugz_import/importer_spec.rb'
-
'
spec/lib/gitlab/git/branch_spec.rb'
-
'
spec/lib/gitlab/git/commit_spec.rb'
-
'
spec/lib/gitlab/git/repository_spec.rb'
-
'
spec/lib/gitlab/git_access_spec.rb'
-
'
spec/lib/gitlab/github_import/importer/diff_note_importer_spec.rb'
-
'
spec/lib/gitlab/github_import/importer/issue_importer_spec.rb'
-
'
spec/lib/gitlab/github_import/importer/issues_importer_spec.rb'
-
'
spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb'
-
'
spec/lib/gitlab/github_import/importer/note_importer_spec.rb'
-
'
spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb'
-
'
spec/lib/gitlab/github_import/importer/releases_importer_spec.rb'
-
'
spec/lib/gitlab/github_import/representation/diff_note_spec.rb'
-
'
spec/lib/gitlab/github_import/representation/issue_spec.rb'
-
'
spec/lib/gitlab/github_import/representation/note_spec.rb'
-
'
spec/lib/gitlab/github_import/representation/pull_request_spec.rb'
-
'
spec/lib/gitlab/grape_logging/formatters/lograge_with_timestamp_spec.rb'
-
'
spec/lib/gitlab/grape_logging/loggers/cloudflare_logger_spec.rb'
-
'
spec/lib/gitlab/grape_logging/loggers/queue_duration_logger_spec.rb'
-
'
spec/lib/gitlab/graphql_logger_spec.rb'
-
'
spec/lib/gitlab/graphs/commits_spec.rb'
-
'
spec/lib/gitlab/import_export/project/relation_factory_spec.rb'
-
'
spec/lib/gitlab/instrumentation_helper_spec.rb'
-
'
spec/lib/gitlab/json_logger_spec.rb'
-
'
spec/lib/gitlab/lfs_token_spec.rb'
-
'
spec/lib/gitlab/log_timestamp_formatter_spec.rb'
-
'
spec/lib/gitlab/middleware/rails_queue_duration_spec.rb'
-
'
spec/lib/gitlab/omniauth_logging/json_formatter_spec.rb'
-
'
spec/lib/gitlab/phabricator_import/issues/task_importer_spec.rb'
-
'
spec/lib/gitlab/phabricator_import/representation/task_spec.rb'
-
'
spec/lib/gitlab/prometheus/queries/additional_metrics_deployment_query_spec.rb'
-
'
spec/lib/gitlab/prometheus/queries/deployment_query_spec.rb'
-
'
spec/lib/gitlab/prometheus/queries/validate_query_spec.rb'
-
'
spec/lib/gitlab/sherlock/transaction_spec.rb'
-
'
spec/lib/gitlab/sidekiq_logging/json_formatter_spec.rb'
-
'
spec/lib/gitlab/sidekiq_middleware/duplicate_jobs/strategies/until_executing_spec.rb'
-
'
spec/lib/gitlab/updated_notes_paginator_spec.rb'
-
'
spec/lib/gitlab/utils/json_size_estimator_spec.rb'
-
'
spec/lib/gitlab/x509/signature_spec.rb'
-
'
spec/lib/grafana/time_window_spec.rb'
-
'
spec/lib/json_web_token/hmac_token_spec.rb'
-
'
spec/lib/rspec_flaky/flaky_example_spec.rb'
-
'
spec/lib/rspec_flaky/listener_spec.rb'
-
'
spec/lib/rspec_flaky/report_spec.rb'
# Offense count: 8
# Cop supports --auto-correct.
Security/YAMLLoad
:
...
...
app/assets/javascripts/boards/components/board_content.vue
浏览文件 @
0bfb6245
<
script
>
import
BoardContentLayout
from
'
~/boards/components/board_content_layout.vue
'
;
import
BoardColumn
from
'
~/boards/components/board_column.vue
'
;
import
{
mapState
}
from
'
vuex
'
;
import
BoardColumn
from
'
ee_else_ce/boards/components/board_column.vue
'
;
import
EpicsSwimlanes
from
'
ee_component/boards/components/epics_swimlanes.vue
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
export
default
{
components
:
{
BoardContentLayout
,
BoardColumn
,
EpicsSwimlanes
,
},
mixins
:
[
glFeatureFlagMixin
()],
props
:
{
lists
:
{
type
:
Array
,
required
:
true
,
},
canAdminList
:
{
type
:
Boolean
,
required
:
true
,
},
groupId
:
{
type
:
Number
,
required
:
false
,
default
:
null
,
},
disabled
:
{
type
:
Boolean
,
required
:
true
,
},
issueLinkBase
:
{
type
:
String
,
required
:
true
,
},
rootPath
:
{
type
:
String
,
required
:
true
,
},
boardId
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
...
mapState
([
'
isShowingEpicsSwimlanes
'
,
'
boardLists
'
]),
isSwimlanesOn
()
{
return
this
.
glFeatures
.
boardsWithSwimlanes
&&
this
.
isShowingEpicsSwimlanes
;
},
},
};
</
script
>
<
template
>
<board-content-layout
v-bind=
"$attrs"
>
<template
#board-content-decoration
="
{ lists, canAdminList, groupId, disabled, issueLinkBase, rootPath, boardId }"
<div>
<div
v-if=
"!isSwimlanesOn"
class=
"boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap"
data-qa-selector=
"boards_list"
>
<board-column
v-for=
"list in lists"
...
...
@@ -27,6 +69,16 @@ export default {
:root-path=
"rootPath"
:board-id=
"boardId"
/>
</
template
>
</board-content-layout>
</div>
<epics-swimlanes
v-else
ref=
"swimlanes"
:lists=
"boardLists"
:can-admin-list=
"canAdminList"
:disabled=
"disabled"
:board-id=
"boardId"
:group-id=
"groupId"
:root-path=
"rootPath"
/>
</div>
</
template
>
app/assets/javascripts/boards/components/board_content_layout.vue
已删除
100644 → 0
浏览文件 @
7fdacd20
<
script
>
export
default
{
props
:
{
lists
:
{
type
:
Array
,
required
:
true
,
},
canAdminList
:
{
type
:
Boolean
,
required
:
true
,
},
groupId
:
{
type
:
Number
,
required
:
false
,
default
:
null
,
},
disabled
:
{
type
:
Boolean
,
required
:
true
,
},
issueLinkBase
:
{
type
:
String
,
required
:
true
,
},
rootPath
:
{
type
:
String
,
required
:
true
,
},
boardId
:
{
type
:
String
,
required
:
true
,
},
isSwimlanesOff
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
};
</
script
>
<
template
>
<div
:class=
"
{ 'boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap': isSwimlanesOff }"
data-qa-selector="boards_list"
data-testid="boards_list"
>
<slot
name=
"board-content-decoration"
v-bind=
"$props"
></slot>
</div>
</
template
>
app/assets/javascripts/boards/index.js
浏览文件 @
0bfb6245
...
...
@@ -4,7 +4,6 @@ import { mapActions } from 'vuex';
import
'
ee_else_ce/boards/models/issue
'
;
import
'
ee_else_ce/boards/models/list
'
;
import
BoardContent
from
'
ee_else_ce/boards/components/board_content.vue
'
;
import
BoardSidebar
from
'
ee_else_ce/boards/components/board_sidebar
'
;
import
initNewListDropdown
from
'
ee_else_ce/boards/components/new_list_dropdown
'
;
import
boardConfigToggle
from
'
ee_else_ce/boards/config_toggle
'
;
...
...
@@ -19,6 +18,7 @@ import {
}
from
'
ee_else_ce/boards/ee_functions
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
BoardContent
from
'
~/boards/components/board_content.vue
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
Flash
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
...
...
app/helpers/notes_helper.rb
浏览文件 @
0bfb6245
...
...
@@ -57,12 +57,14 @@ module NotesHelper
def
add_diff_note_button
(
line_code
,
position
,
line_type
)
return
if
@diff_notes_disabled
button_tag
''
,
class:
'add-diff-note js-add-diff-note-button'
,
type:
'submit'
,
name:
'button'
,
data:
diff_view_line_data
(
line_code
,
position
,
line_type
),
title:
_
(
'Add a comment to this line'
)
do
sprite_icon
(
'comment'
,
size:
12
)
content_tag
(
:span
,
class:
'add-diff-note tooltip-wrapper'
)
do
button_tag
''
,
class:
'note-button add-diff-note js-add-diff-note-button'
,
type:
'submit'
,
name:
'button'
,
data:
diff_view_line_data
(
line_code
,
position
,
line_type
),
title:
_
(
'Add a comment to this line'
)
do
sprite_icon
(
'comment'
,
size:
12
)
end
end
end
...
...
changelogs/unreleased/sh-fix-time-zones.yml
0 → 100644
浏览文件 @
0bfb6245
---
title
:
Fix time zone config not respected in multi-threaded servers
merge_request
:
39778
author
:
type
:
fixed
config/initializers/time_zone.rb
浏览文件 @
0bfb6245
Time
.
zone
=
Gitlab
.
config
.
gitlab
.
time_zone
||
Time
.
zone
# The default is normally set by Rails in the
# active_support.initialize_time_zone Railtie, but we need to set it
# here because the config settings aren't available until after that
# runs. We set the default to ensure multi-threaded servers have the
# right value.
Time
.
zone_default
=
Time
.
zone
Rails
.
application
.
config
.
time_zone
=
Time
.
zone
doc/api/graphql/reference/gitlab_schema.graphql
浏览文件 @
0bfb6245
...
...
@@ -7806,6 +7806,16 @@ type Iteration {
"""
iid
:
ID
!
"""
Web
path
of
the
iteration
,
scoped
to
the
query
parent
.
Only
valid
for
Project
parents
.
Returns
null
in
other
contexts
"""
scopedPath
:
String
"""
Web
URL
of
the
iteration
,
scoped
to
the
query
parent
.
Only
valid
for
Project
parents
.
Returns
null
in
other
contexts
"""
scopedUrl
:
String
"""
Timestamp
of
the
iteration
start
date
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
浏览文件 @
0bfb6245
...
...
@@ -21511,6 +21511,34 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "scopedPath",
"description": "Web path of the iteration, scoped to the query parent. Only valid for Project parents. Returns null in other contexts",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "scopedUrl",
"description": "Web URL of the iteration, scoped to the query parent. Only valid for Project parents. Returns null in other contexts",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "startDate",
"description": "Timestamp of the iteration start date",
doc/api/graphql/reference/index.md
浏览文件 @
0bfb6245
...
...
@@ -1191,6 +1191,8 @@ Represents an iteration object.
|
`dueDate`
| Time | Timestamp of the iteration due date |
|
`id`
| ID! | ID of the iteration |
|
`iid`
| ID! | Internal ID of the iteration |
|
`scopedPath`
| String | Web path of the iteration, scoped to the query parent. Only valid for Project parents. Returns null in other contexts |
|
`scopedUrl`
| String | Web URL of the iteration, scoped to the query parent. Only valid for Project parents. Returns null in other contexts |
|
`startDate`
| Time | Timestamp of the iteration start date |
|
`state`
| IterationState! | State of the iteration |
|
`title`
| String! | Title of the iteration |
...
...
doc/development/telemetry/snowplow.md
浏览文件 @
0bfb6245
...
...
@@ -305,12 +305,16 @@ We use the [AsyncEmitter](https://github.com/snowplow/snowplow/wiki/Ruby-Tracker
There are several tools for developing and testing Snowplow Event
| Testing Tool | Frontend Tracking | Backend Tracking | Local Development Environment | Production Environment |
|----------------------------------------------|--------------------|---------------------|-------------------------------|------------------------|
| Snowplow Analytics Debugger Chrome Extension |
**{check-circle}**
|
**{dotted-circle}**
|
**{check-circle}**
|
**{check-circle}**
|
| Snowplow Inspector Chrome Extension |
**{check-circle}**
|
**{dotted-circle}**
|
**{check-circle}**
|
**{check-circle}**
|
| Snowplow Micro |
**{check-circle}**
|
**{check-circle}**
|
**{check-circle}**
|
**{dotted-circle}**
|
| Snowplow Mini |
**{check-circle}**
|
**{check-circle}**
|
**{dotted-circle}**
|
**{check-circle}**
|
| Testing Tool | Frontend Tracking | Backend Tracking | Local Development Environment | Production Environment | Production Environment |
|----------------------------------------------|--------------------|---------------------|-------------------------------|------------------------|------------------------|
| Snowplow Analytics Debugger Chrome Extension |
**{check-circle}**
|
**{dotted-circle}**
|
**{check-circle}**
|
**{check-circle}**
|
**{check-circle}**
|
| Snowplow Inspector Chrome Extension |
**{check-circle}**
|
**{dotted-circle}**
|
**{check-circle}**
|
**{check-circle}**
|
**{check-circle}**
|
| Snowplow Micro |
**{check-circle}**
|
**{check-circle}**
|
**{check-circle}**
|
**{dotted-circle}**
|
**{dotted-circle}**
|
| Snowplow Mini |
**{check-circle}**
|
**{check-circle}**
|
**{dotted-circle}**
|
**{status_preparing}**
|
**{status_preparing}**
|
**Legend**
**{check-circle}**
Available,
**{status_preparing}**
In progress,
**{dotted-circle}**
Not Planned
### Snowplow Analytics Debugger Chrome Extension
...
...
lib/api/issues.rb
浏览文件 @
0bfb6245
...
...
@@ -55,7 +55,7 @@ module API
desc:
'Return issues ordered by `created_at` or `updated_at` fields.'
optional
:sort
,
type:
String
,
values:
%w[asc desc]
,
default:
'desc'
,
desc:
'Return issues sorted in `asc` or `desc` order.'
optional
:due_date
,
type:
String
,
values:
%w[0 overdue week month next_month_and_previous_two_weeks]
,
optional
:due_date
,
type:
String
,
values:
%w[0 overdue week month next_month_and_previous_two_weeks]
<<
''
,
desc:
'Return issues that have no due date (`0`), or whose due date is this week, this month, between two weeks ago and next month, or which are overdue. Accepts: `overdue`, `week`, `month`, `next_month_and_previous_two_weeks`, `0`'
use
:issues_stats_params
...
...
lib/api/users.rb
浏览文件 @
0bfb6245
...
...
@@ -218,7 +218,7 @@ module API
user_params
=
declared_params
(
include_missing:
false
)
user_params
[
:password_expires_at
]
=
Time
.
now
if
user_params
[
:password
].
present?
user_params
[
:password_expires_at
]
=
Time
.
current
if
user_params
[
:password
].
present?
result
=
::
Users
::
UpdateService
.
new
(
current_user
,
user_params
.
merge
(
user:
user
)).
execute
if
result
[
:status
]
==
:success
...
...
lib/gitlab/incident_management/pager_duty/incident_issue_description.rb
浏览文件 @
0bfb6245
...
...
@@ -32,7 +32,7 @@ module Gitlab
end
def
incident_created_at
Time
.
parse
(
incident_payload
[
'created_at'
])
Time
.
zone
.
parse
(
incident_payload
[
'created_at'
])
rescue
Time
.
current
.
utc
# PagerDuty provides time in UTC
end
...
...
lib/gitlab/usage_data.rb
浏览文件 @
0bfb6245
...
...
@@ -58,7 +58,7 @@ module Gitlab
end
def
recorded_at
Time
.
now
Time
.
current
end
# rubocop: disable Metrics/AbcSize
...
...
lib/gitlab/utils/usage_data.rb
浏览文件 @
0bfb6245
...
...
@@ -93,7 +93,7 @@ module Gitlab
end
def
with_finished_at
(
key
,
&
block
)
yield
.
merge
(
key
=>
Time
.
now
)
yield
.
merge
(
key
=>
Time
.
current
)
end
private
...
...
spec/frontend/boards/components/board_content_layout_spec.js
已删除
100644 → 0
浏览文件 @
7fdacd20
import
{
mount
}
from
'
@vue/test-utils
'
;
import
BoardContentLayout
from
'
~/boards/components/board_content_layout.vue
'
;
const
TestComponent
=
{
components
:
{
BoardContentLayout
},
template
:
`
<div>
<board-content-layout v-bind="$attrs">
<template v-slot:board-content-decoration="{ groupId }">
<p data-testid="child">{{ groupId }}</p>
</template>
</board-content-layout>
</div>
`
,
};
describe
(
'
BoardContentLayout
'
,
()
=>
{
let
wrapper
;
const
groupId
=
1
;
const
createComponent
=
props
=>
{
wrapper
=
mount
(
TestComponent
,
{
propsData
:
{
lists
:
[],
canAdminList
:
true
,
groupId
,
disabled
:
false
,
issueLinkBase
:
''
,
rootPath
:
''
,
boardId
:
''
,
...
props
,
},
});
};
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
=
null
;
});
it
(
'
renders children in the slot
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
find
(
'
[data-testid="child"]
'
).
exists
()).
toBe
(
true
);
});
it
(
'
renders groupId from the scoped slot
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
find
(
'
[data-testid="child"]
'
).
text
()).
toContain
(
groupId
);
});
describe
(
'
when isSwimlanesOff
'
,
()
=>
{
it
(
'
renders the correct class on the root div
'
,
()
=>
{
createComponent
({
isSwimlanesOff
:
true
});
expect
(
wrapper
.
find
(
'
[data-testid="boards_list"]
'
).
classes
()).
toEqual
([
'
boards-list
'
,
'
gl-w-full
'
,
'
gl-py-5
'
,
'
gl-px-3
'
,
'
gl-white-space-nowrap
'
,
]);
});
});
});
spec/frontend/boards/components/board_content_spec.js
已删除
100644 → 0
浏览文件 @
7fdacd20
import
{
mount
}
from
'
@vue/test-utils
'
;
import
axios
from
'
axios
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
BoardContent
from
'
~/boards/components/board_content.vue
'
;
import
BoardColumn
from
'
~/boards/components/board_column.vue
'
;
import
List
from
'
~/boards/models/list
'
;
import
{
listObj
}
from
'
../mock_data
'
;
describe
(
'
BoardContent
'
,
()
=>
{
let
wrapper
;
let
mock
;
const
createComponent
=
()
=>
{
wrapper
=
mount
(
BoardContent
,
{
propsData
:
{
lists
:
[
new
List
(
listObj
)],
canAdminList
:
true
,
groupId
:
1
,
disabled
:
false
,
issueLinkBase
:
''
,
rootPath
:
''
,
boardId
:
''
,
},
});
};
beforeEach
(()
=>
{
mock
=
new
MockAdapter
(
axios
);
});
afterEach
(()
=>
{
mock
.
restore
();
});
it
(
'
finds BoardColumns
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
findAll
(
BoardColumn
).
length
).
toBe
(
1
);
});
});
spec/lib/gitlab/alerting/alert_spec.rb
浏览文件 @
0bfb6245
...
...
@@ -191,7 +191,7 @@ RSpec.describe Gitlab::Alerting::Alert do
end
context
'with payload'
do
let
(
:time
)
{
Time
.
now
.
change
(
usec:
0
)
}
let
(
:time
)
{
Time
.
current
.
change
(
usec:
0
)
}
before
do
payload
[
'startsAt'
]
=
time
.
rfc3339
...
...
@@ -274,7 +274,7 @@ RSpec.describe Gitlab::Alerting::Alert do
before
do
payload
.
update
(
'annotations'
=>
{
'title'
=>
'some title'
},
'startsAt'
=>
Time
.
now
.
rfc3339
'startsAt'
=>
Time
.
current
.
rfc3339
)
end
...
...
spec/lib/gitlab/utils/usage_data_spec.rb
浏览文件 @
0bfb6245
...
...
@@ -122,7 +122,7 @@ RSpec.describe Gitlab::Utils::UsageData do
freeze_time
do
result
=
described_class
.
with_finished_at
(
:current_time
)
{
{
a:
1
}
}
expect
(
result
).
to
eq
(
a:
1
,
current_time:
Time
.
now
)
expect
(
result
).
to
eq
(
a:
1
,
current_time:
Time
.
current
)
end
end
end
...
...
spec/requests/api/issues/issues_spec.rb
浏览文件 @
0bfb6245
...
...
@@ -404,6 +404,12 @@ RSpec.describe API::Issues do
travel_back
end
it
'returns them all when argument is empty'
do
get
api
(
'/issues?due_date='
,
user
)
expect_paginated_array_response
(
issue5
.
id
,
issue4
.
id
,
issue3
.
id
,
issue2
.
id
,
issue
.
id
,
closed_issue
.
id
)
end
it
'returns issues without due date'
do
get
api
(
'/issues?due_date=0'
,
user
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录