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
7a7c01b9
Commit
7a7c01b9
authored
Jun 26, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lock_warning' into 'master'
Rename MergeRequest#lock! to #lock_mr!
parents
024e0577
b5007c15
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/merge_request.rb
app/models/merge_request.rb
+2
-2
app/services/merge_requests/auto_merge_service.rb
app/services/merge_requests/auto_merge_service.rb
+3
-3
No files found.
app/models/merge_request.rb
View file @
7a7c01b9
...
@@ -62,11 +62,11 @@ class MergeRequest < ActiveRecord::Base
...
@@ -62,11 +62,11 @@ class MergeRequest < ActiveRecord::Base
transition
closed: :reopened
transition
closed: :reopened
end
end
event
:lock
do
event
:lock
_mr
do
transition
[
:reopened
,
:opened
]
=>
:locked
transition
[
:reopened
,
:opened
]
=>
:locked
end
end
event
:unlock
do
event
:unlock
_mr
do
transition
locked: :reopened
transition
locked: :reopened
end
end
...
...
app/services/merge_requests/auto_merge_service.rb
View file @
7a7c01b9
...
@@ -6,7 +6,7 @@ module MergeRequests
...
@@ -6,7 +6,7 @@ module MergeRequests
# Called when you do merge via GitLab UI
# Called when you do merge via GitLab UI
class
AutoMergeService
<
BaseMergeService
class
AutoMergeService
<
BaseMergeService
def
execute
(
merge_request
,
current_user
,
commit_message
)
def
execute
(
merge_request
,
current_user
,
commit_message
)
merge_request
.
lock
merge_request
.
lock
_mr
if
Gitlab
::
Satellite
::
MergeAction
.
new
(
current_user
,
merge_request
).
merge!
(
commit_message
)
if
Gitlab
::
Satellite
::
MergeAction
.
new
(
current_user
,
merge_request
).
merge!
(
commit_message
)
merge_request
.
merge
merge_request
.
merge
...
@@ -17,11 +17,11 @@ module MergeRequests
...
@@ -17,11 +17,11 @@ module MergeRequests
true
true
else
else
merge_request
.
unlock
merge_request
.
unlock
_mr
false
false
end
end
rescue
rescue
merge_request
.
unlock
if
merge_request
.
locked?
merge_request
.
unlock
_mr
if
merge_request
.
locked?
merge_request
.
mark_as_unmergeable
merge_request
.
mark_as_unmergeable
false
false
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