Sha256: 8139a9af8639abd205eec3ea8af0692de7fe4dc0a2a5383ed71d5e1eabfd59d4

Contents?: true

Size: 478 Bytes

Versions: 9

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

module Shipit
  class PullRequestSerializer < ActiveModel::Serializer
    include GithubUrlHelper
    include ConditionalAttributes

    has_one :user
    has_one :head, serializer: ShortCommitSerializer
    has_many :assignees, serializer: UserSerializer

    attributes :id, :number, :title, :github_id, :additions, :deletions, :state, :html_url

    def html_url
      github_pull_request_url(object) if object.stack.present?
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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