Documentation
¶
Overview ¶
Package parse extracts and rewrites `uses:` references in workflow/action files while preserving the original formatting byte-for-byte.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyRewrites ¶
ApplyRewrites returns content with the given rewrites applied. Every untouched line is left exactly as-is; rewritten lines keep their prefix, quoting, and action path, changing only the ref and trailing comment.
Types ¶
type Rewrite ¶
Rewrite pins one line's ref to SHA, labeling it with Version (nil omits the trailing comment).
type UsesRef ¶
type UsesRef struct {
Line int // zero-based line index
Prefix string // everything up to the value, e.g. " - uses: "
Quote string // surrounding quote char, or "" if unquoted
Action string // owner/repo plus any subpath
Ref string // git ref after @ (tag, branch, or SHA)
Comment string // trailing comment incl. leading "#", or ""
Owner string // first path segment
Repo string // second path segment
}
UsesRef is a parsed `uses:` reference found on a single line.
Click to show internal directories.
Click to hide internal directories.