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
96f3246b
Commit
96f3246b
authored
Nov 21, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
2477ab55
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
143 additions
and
8 deletions
+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
No files found.
app/graphql/types/issue_sort_enum.rb
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
96f3246b
...
...
@@ -9565,6 +9565,9 @@ msgstr ""
msgid "IssuableStatus|moved"
msgstr ""
msgid "IssuableStatus|promoted"
msgstr ""
msgid "Issue"
msgstr ""
...
...
spec/lib/backup/manager_spec.rb
View file @
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
View file @
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
View file @
96f3246b
...
...
@@ -20,6 +20,7 @@ Issue:
-
due_date
-
moved_to_id
-
duplicated_to_id
-
promoted_to_epic_id
-
lock_version
-
milestone_id
-
weight
...
...
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