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
98daab5b
Commit
98daab5b
authored
Feb 01, 2017
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove approval_pending, use approved?
parent
b317ba8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
10 deletions
+5
-10
app/views/projects/merge_requests/widget/_open.html.haml
app/views/projects/merge_requests/widget/_open.html.haml
+1
-3
app/views/projects/merge_requests/widget/open/_accept.html.haml
...ews/projects/merge_requests/widget/open/_accept.html.haml
+3
-4
app/views/projects/merge_requests/widget/open/_rebase.html.haml
...ews/projects/merge_requests/widget/open/_rebase.html.haml
+1
-3
No files found.
app/views/projects/merge_requests/widget/_open.html.haml
View file @
98daab5b
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_tag
(
'merge_request_widget/widget_bundle.js'
)
-
approval_pending
=
@merge_request
.
requires_approve?
&&
!
@merge_request
.
approved?
#merge-request-widget-app
.mr-state-widget
{
'data-endpoint'
=>
merge_request_path
(
@merge_request
),
'data-approval-pending'
=>
approval_pending
}
#merge-request-widget-app
.mr-state-widget
{
'data-endpoint'
=>
merge_request_path
(
@merge_request
),
'data-approval-pending'
=>
!
@merge_request
.
approved?
?
'true'
:
'false'
}
=
render
'projects/merge_requests/widget/heading'
.mr-widget-body
-# After conflicts are resolved, the user is redirected back to the MR page.
...
...
app/views/projects/merge_requests/widget/open/_accept.html.haml
View file @
98daab5b
...
...
@@ -2,7 +2,6 @@
=
page_specific_javascript_tag
(
'merge_request_widget/ci_bundle.js'
)
-
status_class
=
@pipeline
?
" ci-
#{
@pipeline
.
status
}
"
:
nil
-
approval_pending
=
@merge_request
.
requires_approve?
&&
!
@merge_request
.
approved?
=
form_for
[
:merge
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@merge_request
],
remote:
true
,
method: :post
,
html:
{
class:
'accept-mr-form js-quick-submit js-requires-input'
}
do
|
f
|
=
hidden_field_tag
:authenticity_token
,
form_authenticity_token
...
...
@@ -12,10 +11,10 @@
.accept-action
-
if
@pipeline
&&
@pipeline
.
active?
%span
.btn-group
=
button_tag
class:
"btn btn-create js-merge-button merge_when_build_succeeds"
,
disabled:
approval_pending
,
":disabled"
=>
"disableAcceptance"
do
=
button_tag
class:
"btn btn-create js-merge-button merge_when_build_succeeds"
,
disabled:
!
merge_request
.
approved?
,
":disabled"
=>
"disableAcceptance"
do
Merge When Pipeline Succeeds
-
unless
@project
.
only_allow_merge_if_build_succeeds?
=
button_tag
class:
"btn btn-success dropdown-toggle"
,
'data-toggle'
=>
'dropdown'
,
disabled:
approval_pending
,
":disabled"
=>
"disableAcceptance"
do
=
button_tag
class:
"btn btn-success dropdown-toggle"
,
'data-toggle'
=>
'dropdown'
,
disabled:
!
merge_request
.
approved?
,
":disabled"
=>
"disableAcceptance"
do
=
icon
(
'caret-down'
)
%span
.sr-only
Select Merge Moment
...
...
@@ -29,7 +28,7 @@
=
icon
(
'warning fw'
)
Merge Immediately
-
else
=
f
.
button
class:
"btn btn-create btn-grouped js-merge-button accept_merge_request
#{
status_class
}
"
,
disabled:
approval_pending
,
":disabled"
=>
"disableAcceptance"
do
=
f
.
button
class:
"btn btn-create btn-grouped js-merge-button accept_merge_request
#{
status_class
}
"
,
disabled:
!
merge_request
.
approved?
,
":disabled"
=>
"disableAcceptance"
do
Accept Merge Request
-
if
@merge_request
.
force_remove_source_branch?
.accept-control
...
...
app/views/projects/merge_requests/widget/open/_rebase.html.haml
View file @
98daab5b
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_tag
(
'merge_request_widget/ci_bundle.js'
)
-
approval_pending
=
@merge_request
.
requires_approve?
&&
!
@merge_request
.
approved?
-
if
@merge_request
.
rebase_in_progress?
||
(
defined?
(
rebase_in_progress
)
&&
rebase_in_progress
)
%h4
.rebase-in-progress
=
icon
(
"spinner spin"
)
...
...
@@ -23,7 +21,7 @@
=
hidden_field_tag
:authenticity_token
,
form_authenticity_token
.accept-merge-holder.clearfix.js-toggle-container
.accept-action
=
f
.
button
class:
"btn btn-reopen js-rebase-button"
,
disabled:
approval_pending
,
":disabled"
=>
"disableAcceptance"
do
=
f
.
button
class:
"btn btn-reopen js-rebase-button"
,
disabled:
!
merge_request
.
approved?
,
":disabled"
=>
"disableAcceptance"
do
Rebase onto
#{
@merge_request
.
target_branch
}
.accept-control
Fast-forward merge is not possible. Rebase the source branch onto the target branch or merge target branch into source branch to allow this merge request to be merged.
...
...
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