Class: Gitlab::PushOptions
- Inherits:
-
Object
- Object
- Gitlab::PushOptions
- Defined in:
- lib/gitlab/push_options.rb
Constant Summary collapse
- VALID_OPTIONS =
HashWithIndifferentAccess.new({ merge_request: { keys: [ :assign, :create, :description, :draft, :label, :merge_when_pipeline_succeeds, :milestone, :remove_source_branch, :target, :title, :unassign, :unlabel ] }, ci: { keys: [:skip, :variable] }, integrations: { keys: [:skip_ci] } }).freeze
- MULTI_VALUE_OPTIONS =
[ %w[ci variable], %w[merge_request label], %w[merge_request unlabel], %w[merge_request assign], %w[merge_request unassign] ].freeze
- NAMESPACE_ALIASES =
HashWithIndifferentAccess.new({ mr: :merge_request }).freeze
- OPTION_MATCHER =
/(?<namespace>[^\.]+)\.(?<key>[^=]+)=?(?<value>.*)/
- CI_SKIP =
'ci.skip'
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#as_json(*_args) ⇒ Object
Allow #to_json serialization.
- #get ⇒ Object
-
#initialize(options = []) ⇒ PushOptions
constructor
A new instance of PushOptions.
Constructor Details
#initialize(options = []) ⇒ PushOptions
Returns a new instance of PushOptions.
48 49 50 |
# File 'lib/gitlab/push_options.rb', line 48 def initialize( = []) @options = () end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
46 47 48 |
# File 'lib/gitlab/push_options.rb', line 46 def @options end |
Instance Method Details
#as_json(*_args) ⇒ Object
Allow #to_json serialization
57 58 59 |
# File 'lib/gitlab/push_options.rb', line 57 def as_json(*_args) end |
#get ⇒ Object
52 53 54 |
# File 'lib/gitlab/push_options.rb', line 52 def get(...) .dig(...) end |