Sha256: 8935457af02d75438f5fd43ebd0783446930780fcd143ef944171d3006c65495

Contents?: true

Size: 681 Bytes

Versions: 20

Compression:

Stored size: 681 Bytes

Contents

module CC
  module Formatters
    class TicketFormatter < CC::Service::Formatter

      def format_vulnerability_title
        if multiple?
          "#{vulnerabilities.size} new #{warning_type} issues found"
        else
          "New #{warning_type} issue found" << location_info
        end
      end

      def format_vulnerability_body
        if multiple?
          "#{vulnerabilities.size} new #{warning_type} issues were found by Code Climate"
        else
          message = "A #{warning_type} vulnerability was found by Code Climate"
          message << location_info
        end

        message << ".\n\n"
        message << details_url
      end

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
codeclimate-services-1.6.1 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.6.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.5.1 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.5.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.4.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.3.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.2.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.1.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.0.1 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.0.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.6.2 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.6.1 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.6.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.5.3 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.5.2 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.5.1 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.5.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.4.1 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.4.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-0.3.0 lib/cc/formatters/ticket_formatter.rb