Открыть боковую панель
nt_test121
nt_project_9da4a5yt9x4b
Коммиты
2b80d3d0
Коммит
2b80d3d0
создал
Сен 13, 2019
по автору
Samantha Ming
Просмотр файлов
Move haml files to EE render partials
- create partials for code owner form, table, & table headers
владелец
cd1e0ca4
Изменения
7
Скрыть пробелы
Построчно
Рядом
app/views/projects/protected_branches/shared/_branches_list.html.haml
Просмотр файла @
2b80d3d0
...
...
@@ -23,9 +23,9 @@
=
s_
(
"ProtectedBranch|Allowed to merge"
)
%th
=
s_
(
"ProtectedBranch|Allowed to push"
)
-
if
@project
.
merge_requests_require_code_owner_approval
%th
=
s_
(
"ProtectedBranch|Code owner approval"
)
=
render_if_exists
'shared/projects/code_owner_approval_table_head'
-
if
can_admin_project
%th
%tbody
...
...
app/views/projects/protected_branches/shared/_create_protected_branch.html.haml
Просмотр файла @
2b80d3d0
...
...
@@ -24,19 +24,6 @@
=
s_
(
"ProtectedBranch|Allowed to push:"
)
.col-md-10
=
yield
:push_access_levels
-
if
@project
.
merge_requests_require_code_owner_approval
.form-group.row
%label
.col-md-2.text-right
{
for:
'code_owner_approval_required'
}
=
s_
(
"ProtectedBranch|Require approval from code owners:"
)
.col-md-10
%button
{
type:
'button'
,
class:
"js-project-feature-toggle project-feature-toggle is-checked"
,
"aria-label"
:
s_
(
"ProtectedBranch|Toggle code owner approval"
)
}
%span
.toggle-icon
=
sprite_icon
(
'status_success_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-checked'
)
=
sprite_icon
(
'status_failed_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-unchecked'
)
.form-text.text-muted
=
s_
(
"ProtectedBranch|Pushes that change filenames matched by the CODEOWNERS file will be rejected"
)
=
render_if_exists
'shared/projects/code_owner_approval_form'
.card-footer
=
f
.
submit
s_
(
'ProtectedBranch|Protect'
),
class:
'btn-success btn'
,
disabled:
true
app/views/projects/protected_branches/shared/_protected_branch.html.haml
Просмотр файла @
2b80d3d0
...
...
@@ -19,14 +19,7 @@
=
yield
-
if
@project
.
merge_requests_require_code_owner_approval
%td
%button
{
type:
'button'
,
class:
"js-project-feature-toggle project-feature-toggle mr-5 #{'is-checked' if protected_branch.code_owner_approval_required}"
,
"aria-label"
:
s_
(
"ProtectedBranch|Toggle code owner approval"
)
}
%span
.toggle-icon
=
sprite_icon
(
'status_success_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-checked'
)
=
sprite_icon
(
'status_failed_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-unchecked'
)
=
render_if_exists
'shared/projects/code_owner_approval_table'
,
protected_branch:
protected_branch
-
if
can_admin_project
%td
...
...
doc/user/project/protected_branches.md
Просмотр файла @
2b80d3d0
...
...
@@ -87,11 +87,7 @@ Click **Protect** and the branch will appear in the "Protected branch" list.
## Code Owners approvals **(PREMIUM)**
It is possible to require at least one approval for each entry in the
<<<<<<< HEAD
[
`CODEOWNERS` file
](
code_owners.md
)
that matches a file changed in
=======
[
`CODEOWNERS` file
](
../code_owners.md
)
that matches a file changed in
>>>>>>> Update docs to reflect changes to API and UI
the merge request. To enable this feature:
1.
Toggle the
**Require approval from code owners**
slider.
...
...
ee/app/views/shared/projects/_code_owner_approval_form.html.haml
0 → 100644
Просмотр файла @
2b80d3d0
-
if
@project
.
merge_requests_require_code_owner_approval
.form-group.row
%label
.col-md-2.text-right
{
for:
'code_owner_approval_required'
}
=
s_
(
"ProtectedBranch|Require approval from code owners:"
)
.col-md-10
%button
{
type:
'button'
,
class:
"js-project-feature-toggle project-feature-toggle is-checked"
,
"aria-label"
:
s_
(
"ProtectedBranch|Toggle code owner approval"
)
}
%span
.toggle-icon
=
sprite_icon
(
'status_success_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-checked'
)
=
sprite_icon
(
'status_failed_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-unchecked'
)
.form-text.text-muted
=
s_
(
"ProtectedBranch|Pushes that change filenames matched by the CODEOWNERS file will be rejected"
)
ee/app/views/shared/projects/_code_owner_approval_table.html.haml
0 → 100644
Просмотр файла @
2b80d3d0
-
if
@project
.
merge_requests_require_code_owner_approval
%td
%button
{
type:
'button'
,
class:
"js-project-feature-toggle project-feature-toggle mr-5 #{'is-checked' if protected_branch.code_owner_approval_required}"
,
"aria-label"
:
s_
(
"ProtectedBranch|Toggle code owner approval"
)
}
%span
.toggle-icon
=
sprite_icon
(
'status_success_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-checked'
)
=
sprite_icon
(
'status_failed_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-unchecked'
)
ee/app/views/shared/projects/_code_owner_approval_table_head.html.haml
0 → 100644
Просмотр файла @
2b80d3d0
-
if
@project
.
merge_requests_require_code_owner_approval
%th
=
s_
(
"ProtectedBranch|Code owner approval"
)
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать