INNER CODE UNIT · TypeScript

getCommandsConfigFromInputs

peter-evans/slash-command-dispatch · src/command-helper.ts:110

export function getCommandsConfigFromInputs(inputs: Inputs): Command[] {
  core.debug(`Commands: ${inspect(inputs.commands)}`)

  // Build config
  const config: Command[] = []
  for (const c of inputs.commands) {
    const cmd: Command = {
      command: c,
      permission: inputs.permission,
      issue_type: inputs.issueType,
      allow_edits: inputs.allowEdits,
      repository: inputs.repository,
      event_type_suffix: inputs.eventTypeSuffix,
      static_args: inputs.staticArgs,
      dispatch_type: inputs.dispatchType
    }
    config.push(cmd)
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…