Class: GenericCommitStatus

Inherits:
CommitStatus show all
Defined in:
app/models/generic_commit_status.rb

Constant Summary collapse

EXTERNAL_STAGE_IDX =
1_000_000

Constants included from TaggableQueries

TaggableQueries::MAX_TAGS_IDS, TaggableQueries::TooManyTagsError

Constants included from Ci::HasStatus

Ci::HasStatus::ACTIVE_STATUSES, Ci::HasStatus::ALIVE_STATUSES, Ci::HasStatus::AVAILABLE_STATUSES, Ci::HasStatus::BLOCKED_STATUS, Ci::HasStatus::CANCELABLE_STATUSES, Ci::HasStatus::COMPLETED_STATUSES, Ci::HasStatus::DEFAULT_STATUS, Ci::HasStatus::EXCLUDE_IGNORED_STATUSES, Ci::HasStatus::ORDERED_STATUSES, Ci::HasStatus::PASSED_WITH_WARNINGS_STATUSES, Ci::HasStatus::STARTED_STATUSES, Ci::HasStatus::STATUSES_ENUM, Ci::HasStatus::STOPPED_STATUSES, Ci::HasStatus::UnknownStatusError

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Attribute Summary

Attributes included from Importable

#imported, #importing

Instance Method Summary collapse

Methods inherited from CommitStatus

#all_met_to_become_pending?, #archived?, #auto_canceled?, bulk_insert_tags!, #cancelable?, #duration, #expire_etag_cache!, #failed_but_allowed?, #group_name, #has_trace?, #importing?, #latest?, locking_enabled?, #locking_enabled?, names, #playable?, #queued_duration, #recoverable?, #retryable?, #sortable_name, #stuck?, update_as_processed!, #update_older_statuses_retried!

Methods included from TaggableQueries

#tags_ids

Methods included from BulkInsertableAssociations

#bulk_insert_associations!, bulk_inserts_enabled?, with_bulk_insert

Methods included from Presentable

#present

Methods included from AfterCommitQueue

#run_after_commit, #run_after_commit_or_now

Methods included from Ci::HasStatus

#active?, #blocked?, #complete?, #started?

Methods inherited from Ci::ApplicationRecord

model_name, table_name_prefix

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, 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 SensitiveSerializableHash

#serializable_hash

Instance Method Details

#detailed_status(current_user) ⇒ Object


26
27
28
29
30
# File 'app/models/generic_commit_status.rb', line 26

def detailed_status(current_user)
  Gitlab::Ci::Status::External::Factory
    .new(self, current_user)
    .fabricate!
end

#set_default_valuesObject


16
17
18
19
20
# File 'app/models/generic_commit_status.rb', line 16

def set_default_values
  self.context ||= 'default'
  self.stage ||= 'external'
  self.stage_idx ||= EXTERNAL_STAGE_IDX
end

#tagsObject


22
23
24
# File 'app/models/generic_commit_status.rb', line 22

def tags
  [:external]
end