gitlab-org--gitlab-foss/app/models/generic_commit_status.rb

15 lines
273 B
Ruby

class GenericCommitStatus < CommitStatus
before_validation :set_default_values
# GitHub compatible API
alias_attribute :context, :name
def set_default_values
self.context ||= 'default'
self.stage ||= 'external'
end
def tags
[:external]
end
end