This repository has been archived on 2023-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
coverage-check-action/lib/report_adapter.rb
2019-11-02 03:10:52 +01:00

22 lines
516 B
Ruby

# frozen_string_literal: true
# https://developer.github.com/v3/checks/runs/#output-object
class ReportAdapter
class << self
CONCLUSION_TYPES = { failure: 'failure', success: 'success' }.freeze
ANNOTATION_LEVEL = { notice: 'notice', warning: 'warning', failure: 'failure' }.freeze
def conslusion(report)
CONCLUSION_TYPES[:success]
end
def summary(report)
"**Coverage**: #{report.dig('result', 'covered_percent')}%"
end
def annotations(report)
[]
end
end
end