Skip to main content

Module github

Module github 

Source
Expand description

Shared infrastructure for the GitHub-native text formats: --format github-annotations (workflow commands on stdout) and --format github-summary (step-summary markdown).

The escaping contract is byte-compatible with the strict typed fallback in action/scripts/annotate.sh, NOT the legacy jq san helper: message bodies escape % to %25, CR to %0D, and LF to %0A; property values (file=, title=) additionally escape , to %2C and : to %3A. Non-ASCII text passes through as UTF-8. Line numbers below 1 clamp to 1, and fallow’s 0-based columns convert to GitHub’s 1-based workflow-command columns at this boundary.

Structs§

Annotation
One GitHub workflow-command annotation, pre-escaping. message holds real newlines; render_annotation applies the escaping contract.
RenderOptions
Ambient options for the GitHub renderers, resolved once per render at the CLI print boundary so the pure render functions stay deterministic.

Enums§

AnnotationLevel
Annotation severity, ordered most-severe-first so a plain sort puts errors ahead of warnings ahead of notices (GitHub shows at most 10 annotations per type per step; the worst findings must sort into view).
PackageManager
Package manager for fix-command hints, mirroring the jq layer’s PKG_MANAGER parameterization plus native lockfile sniffing (bun is new relative to the jq layer).
PathRebase
How report paths are rebased onto the git repository root. CI platforms address files by repo-root-relative path (GitHub annotations, GitLab’s Code Quality widget, the review-discussion APIs), while fallow emits analysis-root-relative paths; when the analysis root is a subdirectory (e.g. packages/app/), every path needs the offset prefixed.