diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-03-21 16:08:32 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-03-29 09:58:45 +0300 |
commit | bf639fd504c84929ff8542eef81578a6745bf428 (patch) | |
tree | b7eb20a2ef25de759ed3d8a2ef9a063c77564c03 /app/models/merge_request.rb | |
parent | 3a477fec8f1fe6cf1da70a8ae0a8473ab26235bc (diff) |
Create detached merge request pipelines
By using `refs/merge-requests/:iid/head`
ok
ok
Improve naming nicely
Add nice tests
add nice tests
fix some more
revert
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 19557fd476e..7135cf58e33 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -1129,6 +1129,10 @@ class MergeRequest < ActiveRecord::Base "refs/#{Repository::REF_MERGE_REQUEST}/#{iid}/merge" end + def self.merge_request_ref?(ref) + ref.start_with?("refs/#{Repository::REF_MERGE_REQUEST}/") + end + def in_locked_state begin lock_mr |