79 lines
2.6 KiB
YAML
79 lines
2.6 KiB
YAML
|
name: GithubActionReporter
|
||
|
class_comment: '# * Utility class for Github actions.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>'
|
||
|
dependencies:
|
||
|
- name: OutputInterface
|
||
|
type: class
|
||
|
source: Symfony\Component\Console\Output\OutputInterface
|
||
|
properties: []
|
||
|
methods:
|
||
|
- name: error
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: message
|
||
|
- name: file
|
||
|
default: 'null'
|
||
|
- name: line
|
||
|
default: 'null'
|
||
|
- name: col
|
||
|
default: 'null'
|
||
|
comment: "# * Utility class for Github actions.\n# *\n# * @author Maxime Steinhausser\
|
||
|
\ <maxime.steinhausser@gmail.com>\n# */\n# class GithubActionReporter\n# {\n#\
|
||
|
\ /**\n# * @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L80-L85\n\
|
||
|
# */\n# private const ESCAPED_DATA = [\n# '%' => '%25',\n# \"\\r\" => '%0D',\n\
|
||
|
# \"\\n\" => '%0A',\n# ];\n# \n# /**\n# * @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L87-L94\n\
|
||
|
# */\n# private const ESCAPED_PROPERTIES = [\n# '%' => '%25',\n# \"\\r\" => '%0D',\n\
|
||
|
# \"\\n\" => '%0A',\n# ':' => '%3A',\n# ',' => '%2C',\n# ];\n# \n# public function\
|
||
|
\ __construct(\n# private OutputInterface $output,\n# ) {\n# }\n# \n# public static\
|
||
|
\ function isGithubActionEnvironment(): bool\n# {\n# return false !== getenv('GITHUB_ACTIONS');\n\
|
||
|
# }\n# \n# /**\n# * Output an error using the Github annotations format.\n# *\n\
|
||
|
# * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message"
|
||
|
- name: warning
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: message
|
||
|
- name: file
|
||
|
default: 'null'
|
||
|
- name: line
|
||
|
default: 'null'
|
||
|
- name: col
|
||
|
default: 'null'
|
||
|
comment: '# * Output a warning using the Github annotations format.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message'
|
||
|
- name: debug
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: message
|
||
|
- name: file
|
||
|
default: 'null'
|
||
|
- name: line
|
||
|
default: 'null'
|
||
|
- name: col
|
||
|
default: 'null'
|
||
|
comment: '# * Output a debug log using the Github annotations format.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message'
|
||
|
- name: log
|
||
|
visibility: private
|
||
|
parameters:
|
||
|
- name: type
|
||
|
- name: message
|
||
|
- name: file
|
||
|
default: 'null'
|
||
|
- name: line
|
||
|
default: 'null'
|
||
|
- name: col
|
||
|
default: 'null'
|
||
|
comment: null
|
||
|
traits:
|
||
|
- Symfony\Component\Console\Output\OutputInterface
|
||
|
interfaces: []
|