Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
96f3246b
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,发现更多精彩内容 >>
提交
96f3246b
编写于
11月 21, 2019
作者:
G
GitLab Bot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add latest changes from gitlab-org/gitlab@master
上级
2477ab55
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
143 addition
and
8 deletion
+143
-8
app/graphql/types/issue_sort_enum.rb
app/graphql/types/issue_sort_enum.rb
+2
-0
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+1
-1
changelogs/unreleased/29713-graphql-add-issue-weight-sorting.yml
...ogs/unreleased/29713-graphql-add-issue-weight-sorting.yml
+5
-0
changelogs/unreleased/35094-mr-approver-tooltip-color.yml
changelogs/unreleased/35094-mr-approver-tooltip-color.yml
+5
-0
changelogs/unreleased/sh-disable-google-backup-acl.yml
changelogs/unreleased/sh-disable-google-backup-acl.yml
+5
-0
db/migrate/20191026120008_add_promoted_to_epic_to_issues.rb
db/migrate/20191026120008_add_promoted_to_epic_to_issues.rb
+16
-0
db/migrate/20191026120112_add_promoted_to_epic_to_issues_index.rb
...te/20191026120112_add_promoted_to_epic_to_issues_index.rb
+22
-0
db/schema.rb
db/schema.rb
+3
-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
+12
-0
lib/backup/manager.rb
lib/backup/manager.rb
+23
-5
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/lib/backup/manager_spec.rb
spec/lib/backup/manager_spec.rb
+34
-2
spec/lib/gitlab/import_export/all_models.yml
spec/lib/gitlab/import_export/all_models.yml
+1
-0
spec/lib/gitlab/import_export/safe_model_attributes.yml
spec/lib/gitlab/import_export/safe_model_attributes.yml
+1
-0
未找到文件。
app/graphql/types/issue_sort_enum.rb
浏览文件 @
96f3246b
...
...
@@ -12,3 +12,5 @@ module Types
end
# rubocop: enable Graphql/AuthorizeTypes
end
Types
::
IssueSortEnum
.
prepend_if_ee
(
'::EE::Types::IssueSortEnum'
)
app/helpers/issues_helper.rb
浏览文件 @
96f3246b
...
...
@@ -183,4 +183,4 @@ module IssuesHelper
module_function
:url_for_tracker_issue
end
IssuesHelper
.
include
_if_ee
(
'EE::IssuesHelper'
)
IssuesHelper
.
prepend
_if_ee
(
'EE::IssuesHelper'
)
changelogs/unreleased/29713-graphql-add-issue-weight-sorting.yml
0 → 100644
浏览文件 @
96f3246b
---
title
:
Graphql query for issues can now be sorted by weight
merge_request
:
19721
author
:
type
:
added
changelogs/unreleased/35094-mr-approver-tooltip-color.yml
0 → 100644
浏览文件 @
96f3246b
---
title
:
Fixes MR approvers tooltip wrong color
merge_request
:
20287
author
:
Dheeraj Joshi
type
:
fixed
changelogs/unreleased/sh-disable-google-backup-acl.yml
0 → 100644
浏览文件 @
96f3246b
---
title
:
'
Backup:
Disable
setting
of
ACL
for
Google
uploads'
merge_request
:
20407
author
:
type
:
fixed
db/migrate/20191026120008_add_promoted_to_epic_to_issues.rb
0 → 100644
浏览文件 @
96f3246b
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddPromotedToEpicToIssues
<
ActiveRecord
::
Migration
[
5.2
]
DOWNTIME
=
false
def
up
add_column
:issues
,
:promoted_to_epic_id
,
:integer
end
def
down
remove_column
:issues
,
:promoted_to_epic_id
end
end
db/migrate/20191026120112_add_promoted_to_epic_to_issues_index.rb
0 → 100644
浏览文件 @
96f3246b
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddPromotedToEpicToIssuesIndex
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_foreign_key
:issues
,
:epics
,
column: :promoted_to_epic_id
,
on_delete: :nullify
add_concurrent_index
:issues
,
:promoted_to_epic_id
,
where:
'promoted_to_epic_id IS NOT NULL'
end
def
down
remove_concurrent_index
(
:issues
,
:promoted_to_epic_id
)
remove_foreign_key
:issues
,
column: :promoted_to_epic_id
end
end
db/schema.rb
浏览文件 @
96f3246b
...
...
@@ -2049,6 +2049,7 @@ ActiveRecord::Schema.define(version: 2019_11_18_182722) do
t
.
integer
"closed_by_id"
t
.
integer
"state_id"
,
limit:
2
,
default:
1
,
null:
false
t
.
integer
"duplicated_to_id"
t
.
integer
"promoted_to_epic_id"
t
.
index
[
"author_id"
],
name:
"index_issues_on_author_id"
t
.
index
[
"closed_by_id"
],
name:
"index_issues_on_closed_by_id"
t
.
index
[
"confidential"
],
name:
"index_issues_on_confidential"
...
...
@@ -2065,6 +2066,7 @@ ActiveRecord::Schema.define(version: 2019_11_18_182722) do
t
.
index
[
"project_id"
,
"relative_position"
,
"state_id"
,
"id"
],
name:
"idx_issues_on_project_id_and_rel_position_and_state_id_and_id"
,
order:
{
id: :desc
}
t
.
index
[
"project_id"
,
"updated_at"
,
"id"
,
"state"
],
name:
"index_issues_on_project_id_and_updated_at_and_id_and_state"
t
.
index
[
"project_id"
,
"updated_at"
,
"id"
,
"state_id"
],
name:
"idx_issues_on_project_id_and_updated_at_and_id_and_state_id"
t
.
index
[
"promoted_to_epic_id"
],
name:
"index_issues_on_promoted_to_epic_id"
,
where:
"(promoted_to_epic_id IS NOT NULL)"
t
.
index
[
"relative_position"
],
name:
"index_issues_on_relative_position"
t
.
index
[
"state"
],
name:
"index_issues_on_state"
t
.
index
[
"state_id"
],
name:
"idx_issues_on_state_id"
...
...
@@ -4428,6 +4430,7 @@ ActiveRecord::Schema.define(version: 2019_11_18_182722) do
add_foreign_key
"issue_tracker_data"
,
"services"
,
on_delete: :cascade
add_foreign_key
"issue_user_mentions"
,
"issues"
,
on_delete: :cascade
add_foreign_key
"issue_user_mentions"
,
"notes"
,
on_delete: :cascade
add_foreign_key
"issues"
,
"epics"
,
column:
"promoted_to_epic_id"
,
name:
"fk_df75a7c8b8"
,
on_delete: :nullify
add_foreign_key
"issues"
,
"issues"
,
column:
"duplicated_to_id"
,
name:
"fk_9c4516d665"
,
on_delete: :nullify
add_foreign_key
"issues"
,
"issues"
,
column:
"moved_to_id"
,
name:
"fk_a194299be1"
,
on_delete: :nullify
add_foreign_key
"issues"
,
"milestones"
,
name:
"fk_96b1dd429c"
,
on_delete: :nullify
...
...
doc/api/graphql/reference/gitlab_schema.graphql
浏览文件 @
96f3246b
...
...
@@ -2537,6 +2537,16 @@ enum IssueSort {
"""
RELATIVE_POSITION_ASC
"""
Weight
by
ascending
order
"""
WEIGHT_ASC
"""
Weight
by
descending
order
"""
WEIGHT_DESC
"""
Created
at
ascending
order
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
浏览文件 @
96f3246b
...
...
@@ -13772,6 +13772,18 @@
"description": "Relative position by ascending order",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_ASC",
"description": "Weight by ascending order",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_DESC",
"description": "Weight by descending order",
"isDeprecated": false,
"deprecationReason": null
}
],
"possibleTypes": null
...
...
lib/backup/manager.rb
浏览文件 @
96f3246b
...
...
@@ -47,11 +47,7 @@ module Backup
directory
=
connect_to_remote_directory
(
connection_settings
)
if
directory
.
files
.
create
(
key:
remote_target
,
body:
File
.
open
(
tar_file
),
public:
false
,
multipart_chunk_size:
Gitlab
.
config
.
backup
.
upload
.
multipart_chunk_size
,
encryption:
Gitlab
.
config
.
backup
.
upload
.
encryption
,
encryption_key:
Gitlab
.
config
.
backup
.
upload
.
encryption_key
,
storage_class:
Gitlab
.
config
.
backup
.
upload
.
storage_class
)
if
directory
.
files
.
create
(
create_attributes
)
progress
.
puts
"done"
.
color
(
:green
)
else
puts
"uploading backup to
#{
remote_directory
}
failed"
.
color
(
:red
)
...
...
@@ -252,5 +248,27 @@ module Backup
skipped:
ENV
[
"SKIP"
]
}
end
def
create_attributes
attrs
=
{
key:
remote_target
,
body:
File
.
open
(
tar_file
),
multipart_chunk_size:
Gitlab
.
config
.
backup
.
upload
.
multipart_chunk_size
,
encryption:
Gitlab
.
config
.
backup
.
upload
.
encryption
,
encryption_key:
Gitlab
.
config
.
backup
.
upload
.
encryption_key
,
storage_class:
Gitlab
.
config
.
backup
.
upload
.
storage_class
}
# Google bucket-only policies prevent setting an ACL. In any case, by default,
# all objects are set to the default ACL, which is project-private:
# https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls
attrs
[
:public
]
=
false
unless
google_provider?
attrs
end
def
google_provider?
Gitlab
.
config
.
backup
.
upload
.
connection
&
.
provider
&
.
downcase
==
'google'
end
end
end
locale/gitlab.pot
浏览文件 @
96f3246b
...
...
@@ -9565,6 +9565,9 @@ msgstr ""
msgid "IssuableStatus|moved"
msgstr ""
msgid "IssuableStatus|promoted"
msgstr ""
msgid "Issue"
msgstr ""
...
...
spec/lib/backup/manager_spec.rb
浏览文件 @
96f3246b
...
...
@@ -326,7 +326,7 @@ describe Backup::Manager do
context
'target path'
do
it
'uses the tar filename by default'
do
expect_any_instance_of
(
Fog
::
Collection
).
to
receive
(
:create
)
.
with
(
hash_including
(
key:
backup_filename
))
.
with
(
hash_including
(
key:
backup_filename
,
public:
false
))
.
and_return
(
true
)
Dir
.
chdir
(
Gitlab
.
config
.
backup
.
path
)
do
...
...
@@ -338,7 +338,39 @@ describe Backup::Manager do
stub_env
(
'DIRECTORY'
,
'daily'
)
expect_any_instance_of
(
Fog
::
Collection
).
to
receive
(
:create
)
.
with
(
hash_including
(
key:
"daily/
#{
backup_filename
}
"
))
.
with
(
hash_including
(
key:
"daily/
#{
backup_filename
}
"
,
public:
false
))
.
and_return
(
true
)
Dir
.
chdir
(
Gitlab
.
config
.
backup
.
path
)
do
subject
.
upload
end
end
end
context
'with Google provider'
do
before
do
stub_backup_setting
(
upload:
{
connection:
{
provider:
'Google'
,
google_storage_access_key_id:
'test-access-id'
,
google_storage_secret_access_key:
'secret'
},
remote_directory:
'directory'
,
multipart_chunk_size:
Gitlab
.
config
.
backup
.
upload
.
multipart_chunk_size
,
encryption:
nil
,
encryption_key:
nil
,
storage_class:
nil
}
)
connection
=
::
Fog
::
Storage
.
new
(
Gitlab
.
config
.
backup
.
upload
.
connection
.
symbolize_keys
)
connection
.
directories
.
create
(
key:
Gitlab
.
config
.
backup
.
upload
.
remote_directory
)
end
it
'does not attempt to set ACL'
do
expect_any_instance_of
(
Fog
::
Collection
).
to
receive
(
:create
)
.
with
(
hash_excluding
(
public:
false
))
.
and_return
(
true
)
Dir
.
chdir
(
Gitlab
.
config
.
backup
.
path
)
do
...
...
spec/lib/gitlab/import_export/all_models.yml
浏览文件 @
96f3246b
...
...
@@ -15,6 +15,7 @@ issues:
-
user_agent_detail
-
moved_to
-
duplicated_to
-
promoted_to_epic
-
events
-
merge_requests_closing_issues
-
metrics
...
...
spec/lib/gitlab/import_export/safe_model_attributes.yml
浏览文件 @
96f3246b
...
...
@@ -20,6 +20,7 @@ Issue:
-
due_date
-
moved_to_id
-
duplicated_to_id
-
promoted_to_epic_id
-
lock_version
-
milestone_id
-
weight
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录