Merge pull request #8717 from reitermarkus/ansi-annotations
Strip escape codes from annotations.
This commit is contained in:
		
						commit
						a613918859
					
				@ -1,5 +1,7 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
require "utils/tty"
 | 
			
		||||
 | 
			
		||||
module GitHub
 | 
			
		||||
  # Helper functions for interacting with GitHub Actions.
 | 
			
		||||
  #
 | 
			
		||||
@ -26,7 +28,7 @@ module GitHub
 | 
			
		||||
        raise ArgumentError, "Unsupported type: #{type.inspect}" unless [:warning, :error].include?(type)
 | 
			
		||||
 | 
			
		||||
        @type = type
 | 
			
		||||
        @message = String(message)
 | 
			
		||||
        @message = Tty.strip_ansi(message)
 | 
			
		||||
        @file = self.class.path_relative_to_workspace(file) if file
 | 
			
		||||
        @line = Integer(line) if line
 | 
			
		||||
        @column = Integer(column) if column
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user