BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b23f71ec
Unverified
Commit
b23f71ec
authored
Dec 05, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set/unset merge request locked_at timestamp after transition
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
1961b590
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
merge_request.rb
app/models/merge_request.rb
+10
-0
No files found.
app/models/merge_request.rb
View file @
b23f71ec
...
@@ -70,6 +70,16 @@ class MergeRequest < ActiveRecord::Base
...
@@ -70,6 +70,16 @@ class MergeRequest < ActiveRecord::Base
transition
locked: :reopened
transition
locked: :reopened
end
end
after_transition
any
=>
:locked
do
|
merge_request
,
transition
|
merge_request
.
locked_at
=
Time
.
now
merge_request
.
save
end
after_transition
:locked
=>
(
any
-
:locked
)
do
|
merge_request
,
transition
|
merge_request
.
locked_at
=
nil
merge_request
.
save
end
state
:opened
state
:opened
state
:reopened
state
:reopened
state
:closed
state
:closed
...
...
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