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
234f176d
Commit
234f176d
authored
May 31, 2018
by
Lukas Eipert
Committed by
Rémy Coutable
May 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup code for General Project Settings
parent
ec1d3e10
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
42 deletions
+50
-42
app/views/projects/_merge_request_fast_forward_settings.html.haml
...s/projects/_merge_request_fast_forward_settings.html.haml
+0
-13
app/views/projects/_merge_request_merge_method_settings.html.haml
...s/projects/_merge_request_merge_method_settings.html.haml
+36
-0
app/views/projects/_merge_request_rebase_settings.html.haml
app/views/projects/_merge_request_rebase_settings.html.haml
+0
-13
app/views/projects/_merge_request_settings.html.haml
app/views/projects/_merge_request_settings.html.haml
+1
-14
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+12
-1
qa/qa/page/project/settings/merge_request.rb
qa/qa/page/project/settings/merge_request.rb
+1
-1
No files found.
app/views/projects/_merge_request_fast_forward_settings.html.haml
deleted
100644 → 0
View file @
ec1d3e10
-
form
=
local_assigns
.
fetch
(
:form
)
-
project
=
local_assigns
.
fetch
(
:project
)
.form-check
=
label_tag
:project_merge_method_ff
do
=
form
.
radio_button
:merge_method
,
:ff
,
class:
"js-merge-method-radio qa-radio-button-merge-ff"
%strong
Fast-forward merge
%br
%span
.descr
No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded.
%br
%span
.descr
When fast-forward merge is not possible, the user is given the option to rebase.
app/views/projects/_merge_request_merge_method_settings.html.haml
0 → 100644
View file @
234f176d
-
form
=
local_assigns
.
fetch
(
:form
)
-
project
=
local_assigns
.
fetch
(
:project
)
.form-group
=
label_tag
:merge_method_merge
,
class:
'label-light'
do
Merge method
.form-check
=
label_tag
:project_merge_method_merge
do
=
form
.
radio_button
:merge_method
,
:merge
,
class:
"js-merge-method-radio"
%strong
Merge commit
%br
%span
.descr
A merge commit is created for every merge, and merging is allowed as long as there are no conflicts.
.form-check
=
label_tag
:project_merge_method_rebase_merge
do
=
form
.
radio_button
:merge_method
,
:rebase_merge
,
class:
"js-merge-method-radio"
%strong
Merge commit with semi-linear history
%br
%span
.descr
A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible.
This way you could make sure that if this merge request would build, after merging to target branch it would also build.
%br
%span
.descr
When fast-forward merge is not possible, the user is given the option to rebase.
.form-check
=
label_tag
:project_merge_method_ff
do
=
form
.
radio_button
:merge_method
,
:ff
,
class:
"js-merge-method-radio qa-radio-button-merge-ff"
%strong
Fast-forward merge
%br
%span
.descr
No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded.
%br
%span
.descr
When fast-forward merge is not possible, the user is given the option to rebase.
app/views/projects/_merge_request_rebase_settings.html.haml
deleted
100644 → 0
View file @
ec1d3e10
-
form
=
local_assigns
.
fetch
(
:form
)
.form-check
=
label_tag
:project_merge_method_rebase_merge
do
=
form
.
radio_button
:merge_method
,
:rebase_merge
,
class:
"js-merge-method-radio"
%strong
Merge commit with semi-linear history
%br
%span
.descr
A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible.
This way you could make sure that if this merge request would build, after merging to target branch it would also build.
%br
%span
.descr
When fast-forward merge is not possible, the user is given the option to rebase.
app/views/projects/_merge_request_settings.html.haml
View file @
234f176d
-
form
=
local_assigns
.
fetch
(
:form
)
-
form
=
local_assigns
.
fetch
(
:form
)
.form-group
=
render
'projects/merge_request_merge_method_settings'
,
project:
@project
,
form:
form
=
label_tag
:merge_method_merge
,
class:
'label-light'
do
Merge method
.form-check
=
label_tag
:project_merge_method_merge
do
=
form
.
radio_button
:merge_method
,
:merge
,
class:
"js-merge-method-radio"
%strong
Merge commit
%br
%span
.descr
A merge commit is created for every merge, and merging is allowed as long as there are no conflicts.
=
render
'merge_request_rebase_settings'
,
form:
form
=
render
'merge_request_fast_forward_settings'
,
project:
@project
,
form:
form
=
render
'projects/merge_request_merge_settings'
,
form:
form
=
render
'projects/merge_request_merge_settings'
,
form:
form
app/views/projects/edit.html.haml
View file @
234f176d
...
@@ -33,10 +33,15 @@
...
@@ -33,10 +33,15 @@
%span
.light
(optional)
%span
.light
(optional)
=
f
.
text_area
:description
,
class:
"form-control"
,
rows:
3
,
maxlength:
250
=
f
.
text_area
:description
,
class:
"form-control"
,
rows:
3
,
maxlength:
250
=
render_if_exists
'projects/classification_policy_settings'
,
f:
f
-
unless
@project
.
empty_repo?
-
unless
@project
.
empty_repo?
.form-group
.form-group
=
f
.
label
:default_branch
,
"Default Branch"
,
class:
'label-light'
=
f
.
label
:default_branch
,
"Default Branch"
,
class:
'label-light'
=
f
.
select
(
:default_branch
,
@project
.
repository
.
branch_names
,
{},
{
class:
'select2 select-wide'
})
=
f
.
select
(
:default_branch
,
@project
.
repository
.
branch_names
,
{},
{
class:
'select2 select-wide'
})
=
render_if_exists
'shared/repository_size_limit_setting'
,
form:
f
,
type: :project
.form-group
.form-group
=
f
.
label
:tag_list
,
"Tags"
,
class:
'label-light'
=
f
.
label
:tag_list
,
"Tags"
,
class:
'label-light'
=
f
.
text_field
:tag_list
,
value:
@project
.
tag_list
.
sort
.
join
(
', '
),
maxlength:
2000
,
class:
"form-control"
=
f
.
text_field
:tag_list
,
value:
@project
.
tag_list
.
sort
.
join
(
', '
),
maxlength:
2000
,
class:
"form-control"
...
@@ -75,6 +80,8 @@
...
@@ -75,6 +80,8 @@
.js-project-permissions-form
.js-project-permissions-form
=
f
.
submit
'Save changes'
,
class:
"btn btn-save"
=
f
.
submit
'Save changes'
,
class:
"btn btn-save"
=
render_if_exists
'projects/issues_settings'
%section
.settings.merge-requests-feature.no-animate
{
class:
[(
'expanded'
if
expanded
),
(
'hidden'
if
@project
.
project_feature
.
send
(
:merge_requests_access_level
)
==
0
)]
}
%section
.settings.merge-requests-feature.no-animate
{
class:
[(
'expanded'
if
expanded
),
(
'hidden'
if
@project
.
project_feature
.
send
(
:merge_requests_access_level
)
==
0
)]
}
.settings-header
.settings-header
%h4
%h4
...
@@ -84,10 +91,14 @@
...
@@ -84,10 +91,14 @@
%p
%p
Customize your merge request restrictions.
Customize your merge request restrictions.
.settings-content
.settings-content
=
render_if_exists
'shared/promotions/promote_mr_features'
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
],
remote:
true
,
html:
{
multipart:
true
,
class:
"merge-request-settings-form"
},
authenticity_token:
true
do
|
f
|
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
],
remote:
true
,
html:
{
multipart:
true
,
class:
"merge-request-settings-form"
},
authenticity_token:
true
do
|
f
|
=
render
'merge_request_settings'
,
form:
f
=
render
'
projects/
merge_request_settings'
,
form:
f
=
f
.
submit
'Save changes'
,
class:
"btn btn-save qa-save-merge-request-changes"
=
f
.
submit
'Save changes'
,
class:
"btn btn-save qa-save-merge-request-changes"
=
render_if_exists
'projects/service_desk_settings'
=
render
'export'
,
project:
@project
=
render
'export'
,
project:
@project
%section
.settings.advanced-settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
%section
.settings.advanced-settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
...
...
qa/qa/page/project/settings/merge_request.rb
View file @
234f176d
...
@@ -5,7 +5,7 @@ module QA
...
@@ -5,7 +5,7 @@ module QA
class
MergeRequest
<
QA
::
Page
::
Base
class
MergeRequest
<
QA
::
Page
::
Base
include
Common
include
Common
view
'app/views/projects/_merge_request_
fast_forwar
d_settings.html.haml'
do
view
'app/views/projects/_merge_request_
merge_metho
d_settings.html.haml'
do
element
:radio_button_merge_ff
element
:radio_button_merge_ff
end
end
...
...
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