Module: GitHub::Actions Private

Defined in:
brew/Library/Homebrew/utils/github/actions.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Helper functions for interacting with GitHub Actions.

Defined Under Namespace

Classes: Annotation

Class Method Summary collapse

Class Method Details

.escape(string) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
13
14
15
# File 'brew/Library/Homebrew/utils/github/actions.rb', line 10

def self.escape(string)
  # See https://github.community/t/set-output-truncates-multiline-strings/16852/3.
  string.gsub("%", "%25")
        .gsub("\n", "%0A")
        .gsub("\r", "%0D")
end