Module: GitHub::Actions Private

Extended by:
T::Sig
Defined in:
utils/github/actions.rb

Overview

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Helper functions for interacting with GitHub Actions.

Defined Under Namespace

Classes: Annotation

Class Method Summary collapse

Class Method Details

.escape(string) ⇒ String

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:

Returns:



14
15
16
17
18
19
# File 'utils/github/actions.rb', line 14

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