Sha256: 98ed301e1b0aebaa75808bcdba92da1b28c95987054dcf663cd3000763cba808

Contents?: true

Size: 237 Bytes

Versions: 10

Compression:

Stored size: 237 Bytes

Contents

# frozen_string_literal: true
module Shipit
  class ShortCommitSerializer < ActiveModel::Serializer
    attributes :sha, :message

    def message
      object.pull_request? ? object.pull_request_title : object.message
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shipit-engine-0.39.0 app/serializers/shipit/short_commit_serializer.rb
shipit-engine-0.38.0 app/serializers/shipit/short_commit_serializer.rb
shipit-engine-0.37.0 app/serializers/shipit/short_commit_serializer.rb
shipit-engine-0.36.1 app/serializers/shipit/short_commit_serializer.rb
shipit-engine-0.36.0 app/serializers/shipit/short_commit_serializer.rb
shipit-engine-0.35.1 app/serializers/shipit/short_commit_serializer.rb
shipit-engine-0.35.0 app/serializers/shipit/short_commit_serializer.rb
shipit-engine-0.34.0 app/serializers/shipit/short_commit_serializer.rb
shipit-engine-0.33.0 app/serializers/shipit/short_commit_serializer.rb
shipit-engine-0.32.0 app/serializers/shipit/short_commit_serializer.rb