Sha256: 868f75104dfb0bcc2322d71086a84ef1faf384916e85611e0d1072c03f082f33

Contents?: true

Size: 560 Bytes

Versions: 15

Compression:

Stored size: 560 Bytes

Contents

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

    has_one :merge_requested_by
    has_one :head, serializer: ShortCommitSerializer

    attributes :id, :number, :title, :github_id, :additions, :deletions, :state, :merge_status, :mergeable,
               :merge_requested_at, :rejection_reason, :html_url, :branch, :base_ref

    def html_url
      github_pull_request_url(object)
    end

    def include_rejection_reason?
      object.rejection_reason?
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
shipit-engine-0.31.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.30.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.29.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.28.1 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.28.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.27.1 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.27.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.26.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.25.1 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.25.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.24.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.23.1 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.23.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.22.0 app/serializers/shipit/pull_request_serializer.rb
shipit-engine-0.21.0 app/serializers/shipit/pull_request_serializer.rb