Class: RubyLLM::Tribunal::Reporters::GitHub
- Inherits:
-
Object
- Object
- RubyLLM::Tribunal::Reporters::GitHub
- Defined in:
- lib/ruby_llm/tribunal/reporters/github.rb
Overview
GitHub Actions annotations format.
Class Method Summary collapse
Class Method Details
.format(results) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ruby_llm/tribunal/reporters/github.rb', line 9 def format(results) annotations = results[:cases] .select { |c| c[:status] == :failed } .map do |c| reasons = c[:failures].map { |type, reason| "#{type}: #{reason}" }.join('; ') "::error::#{c[:input]}: #{reasons}" end summary = "::notice::Tribunal: #{results[:summary][:passed]}/#{results[:summary][:total]} passed " \ "(#{(results[:summary][:pass_rate] * 100).round}%)" (annotations + [summary]).join("\n") end |