INNER CODE UNIT · TypeScript

setOutput

EndBug/add-and-commit · src/io.ts:70

export function setOutput<T extends output>(name: T, value: OutputTypes[T]) {
  core.debug(`Setting output: ${name}=${value}`);
  outputs[name] = value;
  core.setOutput(name, value);
}

/**
 * Parses an input that can be a boolean (`true`/`false`) or a git-args string.
 * Empty / unset values are returned as an empty string (falsy).
 */
export function parseBoolOrGitArgs(
  name: 'fetch' | 'push' | 'pull',
): string | boolean {
  try {
    return getInput(name, true);
  } catch {
    return getInput(name) || '';
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…