pontil/core/command

GitHub Actions workflow command primitives.

This module provides the foundational types and low-level functions for emitting GitHub Actions workflow commands. These are used throughout pontil/core and other pontil libraries. It should be considered internal to pontil.

Types

Optional properties that can be sent with output annotation commands (notice, error, and warning). See create a check run for more information about annotations.

This type is part of the public API for pontil.

pub type AnnotationProperties {
  Title(String)
  File(String)
  StartLine(Int)
  EndLine(Int)
  StartColumn(Int)
  EndColumn(Int)
}

Constructors

  • Title(String)

    A title for the annotation.

  • File(String)

    The path of the file for which the annotation should be created.

  • StartLine(Int)

    The start line for the annotation.

  • EndLine(Int)

    The end line for the annotation. Defaults to StartLine when StartLine is provided.

  • StartColumn(Int)

    The start column for the annotation. Cannot be sent when StartLine and EndLine are different values.

  • EndColumn(Int)

    The end column for the annotation. Cannot be sent when StartLine and EndLine are different values. Defaults to StartColumn when StartColumn is provided.

The exit code for an action.

This type is part of the public API for pontil.

pub type ExitCode {
  Failure
  Success
}

Constructors

  • Failure

    A code indicating that the action was a failure (1).

  • Success

    A code indicating that the action was successful (0).

Options for reading input values in an action.

This type is part of the public API for pontil.

pub type InputOptions {
  InputRequired
  PreserveInputSpaces
}

Constructors

  • InputRequired

    Whether the input is required. If required and not present, will return an jrror. Inputs are not required by default.

  • PreserveInputSpaces

    Whether leading/trailing whitespace will be preserved for the input. Inputs are trimmed by default.

Errors returned by pontil_core functions.

This type is part of the public API for pontil.

pub type PontilCoreError {
  FileError(error: simplifile.FileError)
  FileNotFound(path: String)
  MissingRequiredInput(name: String)
  InvalidBooleanInput(name: String)
  MissingEnvVar(name: String)
}

Constructors

  • FileError(error: simplifile.FileError)

    A file system operation failed.

  • FileNotFound(path: String)

    A file expected at the given path does not exist.

  • MissingRequiredInput(name: String)

    A required input was not supplied.

  • InvalidBooleanInput(name: String)

    An input value does not meet the YAML 1.2 “Core Schema” boolean specification.

  • MissingEnvVar(name: String)

    A required environment variable is missing or empty.

Search Document