Class: Releases::Evidence
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Releases::Evidence
- Includes:
- Presentable, ShaAttribute
- Defined in:
- app/models/releases/evidence.rb
Constant Summary
Constants inherited from ApplicationRecord
Constants included from HasCheckConstraints
HasCheckConstraints::NOT_NULL_CHECK_PATTERN
Constants included from ResetOnColumnErrors
ResetOnColumnErrors::MAX_RESET_PERIOD
Instance Method Summary collapse
- #milestones ⇒ Object
-
#summary ⇒ Object
Return
summarywithout sensitive information.
Methods included from Presentable
Methods inherited from ApplicationRecord
===, cached_column_list, #create_or_load_association, current_transaction, declarative_enum, default_select_columns, delete_all_returning, #deleted_from_database?, id_in, id_not_in, iid_in, nullable_column?, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
Methods included from Organizations::Sharding
Methods included from ResetOnColumnErrors
#reset_on_union_error, #reset_on_unknown_attribute_error
Methods included from Gitlab::SensitiveSerializableHash
Instance Method Details
#milestones ⇒ Object
16 17 18 |
# File 'app/models/releases/evidence.rb', line 16 def milestones @milestones ||= release.milestones.includes(:issues) end |
#summary ⇒ Object
Return summary without sensitive information.
Removing issues from summary in order to prevent leaking confidential ones. See more gitlab.com/gitlab-org/gitlab/issues/121930
25 26 27 28 29 30 31 32 33 |
# File 'app/models/releases/evidence.rb', line 25 def summary safe_summary = read_attribute(:summary) safe_summary.dig('release', 'milestones')&.each do |milestone| milestone.delete('issues') end safe_summary end |