Skip to main content

Module ci_output

Module ci_output 

Source
Expand description

Compatibility re-exports for CI output builders now owned by fallow-output.

Structs§

CiIssue
Normalized CodeClimate issue used by CI comment renderers.
GroupedReviewIssues
Review issues grouped per (path, line) for one-comment-per-location rendering.
PrCommentRenderInput
Inputs for rendering a sticky PR/MR summary comment.
ReviewCommentRenderInput
Inputs for rendering one inline review comment from a location group.
ReviewEnvelopeRenderInput
Inputs for rendering a GitHub/GitLab review envelope.
ReviewEnvelopeRenderResult
Rendered review envelope plus side-channel signals for CLI telemetry.
ReviewEnvelopeTruncation
Truncation signals produced while rendering a review envelope.
ReviewGitlabDiffRefs
GitLab diff refs for a review-envelope position.

Enums§

CiProvider
Supported CI review providers for generated comments.

Constants§

MARKER_PREFIX_V2
Marker prefix appended to every v2 review-comment body.
MARKER_SUFFIX_V2
Closing of the v2 marker, after the fingerprint string.
MAX_COMMENT_BODY_BYTES
Hard cap on a single review-comment body, matching GitHub’s 65 536-char comment limit; bodies at or over it are truncated with a marker suffix.
PROJECT_LEVEL_RULE_IDS
Rule ids whose findings describe project-wide config state rather than a change touching a specific source line.

Functions§

cap_body_with_marker
Append marker_line to content, truncating content on a char boundary so the whole body stays within MAX_COMMENT_BODY_BYTES. The marker is never sacrificed. Returns the body and whether truncation happened.
command_title
Human-readable report title for a fallow command name, e.g. dupes maps to “duplication report”.
composite_fingerprint
Order-independent fingerprint for a comment merged from several findings: constituents are sorted before hashing and the result carries a merged: prefix.
escape_md
Escape a string for inclusion in a Markdown table cell.
github_check_conclusion
GitHub check conclusion for a set of findings: Failure when any is major or above, Success when empty, Neutral otherwise.
group_review_issues_by_path_line
Group consecutive same-(path, line) issues. Input is already sorted by (path, line, fingerprint) so a single linear pass collects runs.
is_project_level_rule
Whether findings for rule_id describe the whole project (e.g. dependency rules) rather than a specific file location.
issues_from_codeclimate
Extract normalized CI issues from a raw CodeClimate JSON array, sorted by severity then location.
issues_from_codeclimate_issues
Normalize typed CodeClimate issues into CI issues, sorted by severity then location.
render_pr_comment
Render the sticky summary comment body: identity marker, run verdict, headline count, and per-category findings tables.
render_review_comment_for_group
Render one comment from a group of issues sharing the same (path, line).
render_review_envelope
Render a provider-specific review envelope from typed CI issues.
review_label_from_codeclimate
Map a CodeClimate severity name to the review badge label: error for major and above, warn otherwise.
summary_fingerprint
Stable fingerprint for a summary comment body.
summary_label
Collapsible-section label for a findings category: appends “showing N” when the table is capped below the category’s total.