diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-08-28 10:51:26 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-09-03 09:30:53 +0300 |
commit | 8c21610c79d2737c9cd728964f499d793e6a1279 (patch) | |
tree | 82af1d1bed4f1a522658b3dfb7c0bc8a766e88cd /app/models/merge_request.rb | |
parent | 991143eb1f1bb5cda1f709ad44fdc021aa12b75d (diff) |
Add pipeline.type key to PipelineEntity
This commit adds pipeline.type key to PipelineEntity.
This key will be used in MR widget in the next iteration.
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 bfd636fa62a..28e450f9b30 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -1142,6 +1142,10 @@ class MergeRequest < ApplicationRecord ref.start_with?("refs/#{Repository::REF_MERGE_REQUEST}/") end + def self.merge_train_ref?(ref) + %r{\Arefs/#{Repository::REF_MERGE_REQUEST}/\d+/train\z}.match?(ref) + end + def in_locked_state begin lock_mr |