Skip to content

Latest commit

 

History

History
54 lines (50 loc) · 1.36 KB

File metadata and controls

54 lines (50 loc) · 1.36 KB

Operator of map

A action for map lint result

- uses: MeilCli/common-lint-reporter/operator/map@v0
  with:
    function: |
      (x) => Object.assign(x, {message: "message: " + x.message})

Option

Input

  • github_token:
    • github app token, using to read and write repository
    • required
    • default: ${{ github.token }}
  • workspace_path:
    • workspace path, using to convert relative path from absolute path
  • repository:
    • running repository, format: owner/repository
  • pull_request:
    • running pull request number
  • commit_sha:
    • running commit sha
  • report_files:
    • report file glob pattern
    • required
    • default: common_lint.json
  • report_files_follow_symbolic_links:
    • report file glob pattern option
    • value: true or false
  • use_api_context
    • if this option is enabled, set information to context using api
    • more information? see this
    • value: true or false
    • default: false
  • function:
    • the function of this action
    • required
  • output_path:
    • output path
    • required
    • default: common_lint.json

function input

function must be JavaScript's function, such as named-function, no-named-function or lambda-function

example:

function map(x) { 
    return { ...x, message: `[${x.rule}] ${x.message}` } 
}

Specification of returning value? see this