BigW Consortium Gitlab

build_presenter.rb 348 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
module Ci
  class BuildPresenter < Gitlab::View::Presenter::Delegated
    presents :build

    def erased_by_user?
      # Build can be erased through API, therefore it does not have
      # `erased_by` user assigned in that case.
      erased? && erased_by
    end

    def erased_by_name
      erased_by.name if erased_by_user?
    end
  end
end