Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
79216161
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,发现更多精彩内容 >>
提交
79216161
编写于
1月 29, 2020
作者:
G
GitLab Bot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add latest changes from gitlab-org/gitlab@master
上级
c1924b86
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
159 addition
and
87 deletion
+159
-87
app/assets/javascripts/ide/components/new_dropdown/index.vue
app/assets/javascripts/ide/components/new_dropdown/index.vue
+1
-1
app/models/issue_assignee.rb
app/models/issue_assignee.rb
+2
-0
app/models/merge_request_assignee.rb
app/models/merge_request_assignee.rb
+2
-0
app/serializers/variable_entity.rb
app/serializers/variable_entity.rb
+1
-0
changelogs/unreleased/11120-autodevops-test-postgres-version.yml
...ogs/unreleased/11120-autodevops-test-postgres-version.yml
+5
-0
changelogs/unreleased/195989-quick-action-add-dup-assignee-error.yml
...unreleased/195989-quick-action-add-dup-assignee-error.yml
+5
-0
changelogs/unreleased/199257-renamemove-webide-dropdown.yml
changelogs/unreleased/199257-renamemove-webide-dropdown.yml
+5
-0
changelogs/unreleased/avoid-using-gl-object.yml
changelogs/unreleased/avoid-using-gl-object.yml
+5
-0
changelogs/unreleased/dz-scope-project-issues-routing.yml
changelogs/unreleased/dz-scope-project-issues-routing.yml
+5
-0
config/routes/issues.rb
config/routes/issues.rb
+22
-0
config/routes/project.rb
config/routes/project.rb
+8
-18
doc/development/changelog.md
doc/development/changelog.md
+3
-0
lib/gitlab/ci/templates/Jobs/Test.gitlab-ci.yml
lib/gitlab/ci/templates/Jobs/Test.gitlab-ci.yml
+1
-1
lib/gitlab/quick_actions/issue_and_merge_request_actions.rb
lib/gitlab/quick_actions/issue_and_merge_request_actions.rb
+12
-8
locale/gitlab.pot
locale/gitlab.pot
+3
-3
spec/fixtures/api/schemas/variable.json
spec/fixtures/api/schemas/variable.json
+1
-0
spec/frontend/environments/emtpy_state_spec.js
spec/frontend/environments/emtpy_state_spec.js
+40
-0
spec/javascripts/environments/emtpy_state_spec.js
spec/javascripts/environments/emtpy_state_spec.js
+0
-54
spec/models/issue_assignee_spec.rb
spec/models/issue_assignee_spec.rb
+18
-0
spec/models/merge_request_assignee_spec.rb
spec/models/merge_request_assignee_spec.rb
+18
-0
spec/serializers/variable_entity_spec.rb
spec/serializers/variable_entity_spec.rb
+1
-1
spec/services/quick_actions/interpret_service_spec.rb
spec/services/quick_actions/interpret_service_spec.rb
+1
-1
未找到文件。
app/assets/javascripts/ide/components/new_dropdown/index.vue
浏览文件 @
79216161
...
...
@@ -91,7 +91,7 @@ export default {
</
template
>
<li>
<item-button
:label=
"__('Rename')"
:label=
"__('Rename
/Move
')"
class=
"d-flex"
icon=
"pencil"
icon-classes=
"mr-2"
...
...
app/models/issue_assignee.rb
浏览文件 @
79216161
...
...
@@ -3,6 +3,8 @@
class
IssueAssignee
<
ApplicationRecord
belongs_to
:issue
belongs_to
:assignee
,
class_name:
"User"
,
foreign_key: :user_id
validates
:assignee
,
uniqueness:
{
scope: :issue_id
}
end
IssueAssignee
.
prepend_if_ee
(
'EE::IssueAssignee'
)
app/models/merge_request_assignee.rb
浏览文件 @
79216161
...
...
@@ -3,4 +3,6 @@
class
MergeRequestAssignee
<
ApplicationRecord
belongs_to
:merge_request
belongs_to
:assignee
,
class_name:
"User"
,
foreign_key: :user_id
validates
:assignee
,
uniqueness:
{
scope: :merge_request_id
}
end
app/serializers/variable_entity.rb
浏览文件 @
79216161
...
...
@@ -4,6 +4,7 @@ class VariableEntity < Grape::Entity
expose
:id
expose
:key
expose
:value
expose
:variable_type
expose
:protected?
,
as: :protected
expose
:masked?
,
as: :masked
...
...
changelogs/unreleased/11120-autodevops-test-postgres-version.yml
0 → 100644
浏览文件 @
79216161
---
title
:
Use POSTGRES_VERSION variable in Auto DevOps Test stage
merge_request
:
22884
author
:
Serban Marti
type
:
fixed
changelogs/unreleased/195989-quick-action-add-dup-assignee-error.yml
0 → 100644
浏览文件 @
79216161
---
title
:
Fix error when assigning an existing asignee
merge_request
:
23416
author
:
type
:
fixed
changelogs/unreleased/199257-renamemove-webide-dropdown.yml
0 → 100644
浏览文件 @
79216161
---
title
:
"
Change
`Rename`
to
`Rename/Move`
in
Web
IDE
Dropdown"
merge_request
:
23877
author
:
type
:
added
changelogs/unreleased/avoid-using-gl-object.yml
0 → 100644
浏览文件 @
79216161
---
title
:
Fix outdated MR security warning message
merge_request
:
23496
author
:
type
:
fixed
changelogs/unreleased/dz-scope-project-issues-routing.yml
0 → 100644
浏览文件 @
79216161
---
title
:
Copy issues routing under - scope
merge_request
:
23779
author
:
type
:
changed
config/routes/issues.rb
0 → 100644
浏览文件 @
79216161
# frozen_string_literal: true
get
:issues
,
to:
'issues#calendar'
,
constraints:
lambda
{
|
req
|
req
.
format
==
:ics
}
resources
:issues
,
concerns: :awardable
,
constraints:
{
id:
/\d+/
}
do
member
do
post
:toggle_subscription
post
:mark_as_spam
post
:move
put
:reorder
get
:related_branches
get
:can_create_branch
get
:realtime_changes
post
:create_merge_request
get
:discussions
,
format: :json
end
collection
do
post
:bulk_update
post
:import_csv
end
end
config/routes/project.rb
浏览文件 @
79216161
...
...
@@ -401,25 +401,15 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
get
:issues
,
to:
'issues#calendar'
,
constraints:
lambda
{
|
req
|
req
.
format
==
:ics
}
resources
:issues
,
concerns: :awardable
,
constraints:
{
id:
/\d+/
}
do
member
do
post
:toggle_subscription
post
:mark_as_spam
post
:move
put
:reorder
get
:related_branches
get
:can_create_branch
get
:realtime_changes
post
:create_merge_request
get
:discussions
,
format: :json
end
# Unscoped route. It will be replaced with redirect to /-/issues/
# Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
draw
:issues
collection
do
post
:bulk_update
post
:import_csv
end
# To ensure an old unscoped routing is used for the UI we need to
# add prefix 'as' to the scope routing and place it below original routing.
# Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
scope
'-'
,
as:
'scoped'
do
draw
:issues
end
resources
:notes
,
only:
[
:create
,
:destroy
,
:update
],
concerns: :awardable
,
constraints:
{
id:
/\d+/
}
do
...
...
doc/development/changelog.md
浏览文件 @
79216161
...
...
@@ -35,6 +35,8 @@ the `author` field. GitLab team members **should not**.
- Any change that introduces a database migration, whether it's regular, post,
or data migration, **must** have a changelog entry.
- [Security fixes] **must** have a changelog entry, without `merge_request` value
and with `type` set to `security`.
- Any user-facing change **should** have a changelog entry. Example: "GitLab now
uses system fonts for all text."
- Performance improvements **should** have a changelog entry.
...
...
@@ -289,6 +291,7 @@ and then compiling the entries into the overall `CHANGELOG.md` file during the
[release managers]: https://gitlab.com/gitlab-org/release/docs/blob/master/quickstart/release-manager.md
[started brainstorming]: https://gitlab.com/gitlab-org/gitlab-foss/issues/17826
[release process]: https://gitlab.com/gitlab-org/release-tools
[Security fixes]: https://gitlab.com/gitlab-org/release/docs/blob/master/general/security/developer.md
---
...
...
lib/gitlab/ci/templates/Jobs/Test.gitlab-ci.yml
浏览文件 @
79216161
test
:
services
:
-
postgres:latest
-
"
postgres:${POSTGRES_VERSION}"
variables
:
POSTGRES_DB
:
test
stage
:
test
...
...
lib/gitlab/quick_actions/issue_and_merge_request_actions.rb
浏览文件 @
79216161
...
...
@@ -12,6 +12,15 @@ module Gitlab
explanation
do
|
users
|
_
(
'Assigns %{assignee_users_sentence}.'
)
%
{
assignee_users_sentence:
assignee_users_sentence
(
users
)
}
end
execution_message
do
|
users
=
nil
|
if
users
.
blank?
_
(
"Failed to assign a user because no user was found."
)
else
users
=
[
users
.
first
]
unless
quick_action_target
.
allows_multiple_assignees?
_
(
'Assigned %{assignee_users_sentence}.'
)
%
{
assignee_users_sentence:
assignee_users_sentence
(
users
)
}
end
end
params
do
quick_action_target
.
allows_multiple_assignees?
?
'@user1 @user2'
:
'@user'
end
...
...
@@ -23,19 +32,14 @@ module Gitlab
extract_users
(
assignee_param
)
end
command
:assign
do
|
users
|
if
users
.
empty?
@execution_message
[
:assign
]
=
_
(
"Failed to assign a user because no user was found."
)
next
end
next
if
users
.
empty?
if
quick_action_target
.
allows_multiple_assignees?
@updates
[
:assignee_ids
]
||=
quick_action_target
.
assignees
.
map
(
&
:id
)
@updates
[
:assignee_ids
]
+
=
users
.
map
(
&
:id
)
@updates
[
:assignee_ids
]
|
=
users
.
map
(
&
:id
)
else
@updates
[
:assignee_ids
]
=
[
users
.
first
.
id
]
end
@execution_message
[
:assign
]
=
_
(
'Assigned %{assignee_users_sentence}.'
)
%
{
assignee_users_sentence:
assignee_users_sentence
(
users
)
}
end
desc
do
...
...
@@ -249,7 +253,7 @@ module Gitlab
def
assignees_for_removal
(
users
)
assignees
=
quick_action_target
.
assignees
if
users
.
present?
&&
quick_action_target
.
allows_multiple_assignees?
assignees
&
users
users
else
assignees
end
...
...
locale/gitlab.pot
浏览文件 @
79216161
...
...
@@ -15694,15 +15694,15 @@ msgstr ""
msgid "Removing the project will delete its repository and all related resources including issues, merge requests etc."
msgstr ""
msgid "Rename"
msgstr ""
msgid "Rename file"
msgstr ""
msgid "Rename folder"
msgstr ""
msgid "Rename/Move"
msgstr ""
msgid "Reopen epic"
msgstr ""
...
...
spec/fixtures/api/schemas/variable.json
浏览文件 @
79216161
...
...
@@ -13,6 +13,7 @@
"value"
:
{
"type"
:
"string"
},
"masked"
:
{
"type"
:
"boolean"
},
"protected"
:
{
"type"
:
"boolean"
},
"variable_type"
:
{
"type"
:
"string"
},
"environment_scope"
:
{
"type"
:
"string"
,
"optional"
:
true
}
},
"additionalProperties"
:
false
...
...
spec/frontend/environments/emtpy_state_spec.js
0 → 100644
浏览文件 @
79216161
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
EmptyState
from
'
~/environments/components/empty_state.vue
'
;
describe
(
'
environments empty state
'
,
()
=>
{
let
vm
;
beforeEach
(()
=>
{
vm
=
shallowMount
(
EmptyState
,
{
propsData
:
{
newPath
:
'
foo
'
,
canCreateEnvironment
:
true
,
helpPath
:
'
bar
'
,
},
});
});
afterEach
(()
=>
{
vm
.
destroy
();
});
it
(
'
renders the empty state
'
,
()
=>
{
expect
(
vm
.
find
(
'
.js-blank-state-title
'
).
text
()).
toEqual
(
"
You don't have any environments right now
"
,
);
});
it
(
'
renders the new environment button
'
,
()
=>
{
expect
(
vm
.
find
(
'
.js-new-environment-button
'
).
attributes
(
'
href
'
)).
toEqual
(
'
foo
'
);
});
describe
(
'
without permission
'
,
()
=>
{
beforeEach
(()
=>
{
vm
.
setProps
({
canCreateEnvironment
:
false
});
});
it
(
'
does not render the new environment button
'
,
()
=>
{
expect
(
vm
.
find
(
'
.js-new-environment-button
'
).
exists
()).
toBe
(
false
);
});
});
});
spec/javascripts/environments/emtpy_state_spec.js
已删除
100644 → 0
浏览文件 @
c1924b86
import
Vue
from
'
vue
'
;
import
mountComponent
from
'
spec/helpers/vue_mount_component_helper
'
;
import
emptyState
from
'
~/environments/components/empty_state.vue
'
;
describe
(
'
environments empty state
'
,
()
=>
{
let
vm
;
let
Component
;
beforeEach
(()
=>
{
Component
=
Vue
.
extend
(
emptyState
);
});
afterEach
(()
=>
{
vm
.
$destroy
();
});
describe
(
'
With permissions
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
mountComponent
(
Component
,
{
newPath
:
'
foo
'
,
canCreateEnvironment
:
true
,
helpPath
:
'
bar
'
,
});
});
it
(
'
renders empty state and new environment button
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
()).
toEqual
(
"
You don't have any environments right now
"
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
).
getAttribute
(
'
href
'
)).
toEqual
(
'
foo
'
,
);
});
});
describe
(
'
Without permission
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
mountComponent
(
Component
,
{
newPath
:
'
foo
'
,
canCreateEnvironment
:
false
,
helpPath
:
'
bar
'
,
});
});
it
(
'
renders empty state without new button
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
()).
toEqual
(
"
You don't have any environments right now
"
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
)).
toBeNull
();
});
});
});
spec/models/issue_assignee_spec.rb
0 → 100644
浏览文件 @
79216161
# frozen_string_literal: true
require
'spec_helper'
describe
IssueAssignee
do
let
(
:issue
)
{
create
(
:issue
)
}
subject
{
issue
.
issue_assignees
.
build
(
assignee:
create
(
:user
))
}
describe
'associations'
do
it
{
is_expected
.
to
belong_to
(
:issue
).
class_name
(
'Issue'
)
}
it
{
is_expected
.
to
belong_to
(
:assignee
).
class_name
(
'User'
)
}
end
describe
'validations'
do
it
{
is_expected
.
to
validate_uniqueness_of
(
:assignee
).
scoped_to
(
:issue_id
)
}
end
end
spec/models/merge_request_assignee_spec.rb
0 → 100644
浏览文件 @
79216161
# frozen_string_literal: true
require
'spec_helper'
describe
MergeRequestAssignee
do
let
(
:merge_request
)
{
create
(
:merge_request
)
}
subject
{
merge_request
.
merge_request_assignees
.
build
(
assignee:
create
(
:user
))
}
describe
'associations'
do
it
{
is_expected
.
to
belong_to
(
:merge_request
).
class_name
(
'MergeRequest'
)
}
it
{
is_expected
.
to
belong_to
(
:assignee
).
class_name
(
'User'
)
}
end
describe
'validations'
do
it
{
is_expected
.
to
validate_uniqueness_of
(
:assignee
).
scoped_to
(
:merge_request_id
)
}
end
end
spec/serializers/variable_entity_spec.rb
浏览文件 @
79216161
...
...
@@ -10,7 +10,7 @@ describe VariableEntity do
subject
{
entity
.
as_json
}
it
'contains required fields'
do
expect
(
subject
).
to
include
(
:id
,
:key
,
:value
,
:protected
,
:environment_scope
)
expect
(
subject
).
to
include
(
:id
,
:key
,
:value
,
:protected
,
:environment_scope
,
:variable_type
)
end
end
end
spec/services/quick_actions/interpret_service_spec.rb
浏览文件 @
79216161
...
...
@@ -804,7 +804,7 @@ describe QuickActions::InterpretService do
let
(
:issuable
)
{
issue
}
end
it_behaves_like
'empty command'
do
it_behaves_like
'empty command'
,
"Failed to assign a user because no user was found."
do
let
(
:content
)
{
'/assign'
}
let
(
:issuable
)
{
issue
}
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录