Documentation
¶
Index ¶
- func ComparePathPresence(ctx context.Context, client forge.Client, owner, repo string, ...) (missing []string, err error)
- func CustomizedDirs() []string
- func FileMode(path string) string
- func FullsendRepoFile(path string) ([]byte, error)
- func HarnessBaseURL(harnessName, commitSHA string) (string, error)
- func HarnessBaseURLWithHash(harnessName, commitSHA string) (string, error)
- func HarnessContentHash(harnessName string) (string, error)
- func HarnessNames() ([]string, error)
- func IsLayeredPath(path string) bool
- func IsUpstreamOnlyPath(path string) bool
- func LegacyFlatVendoredPaths(workflowPrefix string) ([]string, error)
- func ManagedHeader(path string) string
- func ManagedPaths(_ bool, pathPrefix string) ([]string, error)
- func ManagedVendoredContentPaths(workflowPrefix string) ([]string, error)
- func PathsFromInstallFiles(files InstallFiles) []string
- func PerRepoCustomizedDirs() []string
- func PerRepoShimTemplate() ([]byte, error)
- func PrependManagedHeader(path string, content []byte) []byte
- func RenderDispatchPerRepoStagePaths(content []byte) []byte
- func RenderTemplate(path string, content []byte, opts RenderOptions) ([]byte, error)
- func ResolveVendoredCleanupPaths(ctx context.Context, client forge.Client, ...) ([]string, error)
- func VendorManifestPath(workflowPrefix string) string
- func VendoredMarkerPath() string
- func WalkFullsendRepo(fn func(path string, content []byte) error) error
- func WalkFullsendRepoAll(fn func(path string, content []byte) error) error
- func WalkLayeredContent(fn func(path string, content []byte) error) error
- func WalkUpstream(fn func(path string, content []byte) error) error
- type CollectInstallFilesOptions
- type InstallFile
- type InstallFiles
- type RenderOptions
- type VendorManifest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePathPresence ¶ added in v0.19.0
func ComparePathPresence(ctx context.Context, client forge.Client, owner, repo string, expected []string) (missing []string, err error)
ComparePathPresence checks which expected paths exist in the repo.
func CustomizedDirs ¶ added in v0.8.0
func CustomizedDirs() []string
CustomizedDirs returns the set of customized/ subdirectories that should be scaffolded in a per-org .fullsend config repo.
func FullsendRepoFile ¶
FullsendRepoFile returns the content of a file from the fullsend-repo scaffold. The path is relative to the fullsend-repo root (e.g., ".github/workflows/triage.yml").
func HarnessBaseURL ¶ added in v0.18.0
HarnessBaseURL returns the raw.githubusercontent.com URL for a scaffold harness template at a specific commit SHA. The URL does not include an integrity hash fragment — use HarnessBaseURLWithHash for that.
func HarnessBaseURLWithHash ¶ added in v0.18.0
HarnessBaseURLWithHash returns the full base URL for a scaffold harness template, including the #sha256=... integrity hash fragment.
func HarnessContentHash ¶ added in v0.18.0
HarnessContentHash returns the SHA-256 hex digest of the embedded scaffold harness template. This hash matches what raw.githubusercontent.com serves for the release commit the CLI was built from.
func HarnessNames ¶ added in v0.18.0
HarnessNames returns the sorted list of harness template names available in the embedded scaffold (e.g., ["code", "fix", "triage"]).
func IsLayeredPath ¶ added in v0.19.0
IsLayeredPath reports whether path is in a layered content directory.
func IsUpstreamOnlyPath ¶ added in v0.19.0
IsUpstreamOnlyPath reports whether path is upstream-only infrastructure.
func LegacyFlatVendoredPaths ¶ added in v0.19.0
LegacyFlatVendoredPaths lists pre-.defaults flat layout paths for legacy cleanup.
func ManagedHeader ¶ added in v0.18.0
ManagedHeader returns the managed-by header to prepend to a scaffold file at install time, or an empty string if the file should not have one. Files that support # comments (YAML, shell) get a header pointing to the upstream source. Markdown, JSON, and .gitkeep files are skipped.
func ManagedPaths ¶ added in v0.19.0
ManagedPaths returns embed-derived scaffold paths for analyze/sync. Vendored content is reported separately by the vendor layer.
func ManagedVendoredContentPaths ¶ added in v0.19.0
ManagedVendoredContentPaths returns embed-derived paths for the current vendor layout.
func PathsFromInstallFiles ¶ added in v0.19.0
func PathsFromInstallFiles(files InstallFiles) []string
PathsFromInstallFiles extracts relative paths from install files.
func PerRepoCustomizedDirs ¶ added in v0.8.0
func PerRepoCustomizedDirs() []string
PerRepoCustomizedDirs returns the set of customized/ subdirectories that should be scaffolded in a per-repo .fullsend/ setup.
func PerRepoShimTemplate ¶ added in v0.8.0
PerRepoShimTemplate returns the content of the per-repo shim workflow template.
func PrependManagedHeader ¶ added in v0.18.0
PrependManagedHeader prepends the managed-by header to file content. If the file starts with a shebang (#!), the header is inserted after the first line. Returns content unchanged if no header applies.
func RenderDispatchPerRepoStagePaths ¶ added in v0.19.0
RenderDispatchPerRepoStagePaths rewrites stage workflow paths for vendored per-repo installs where reusable-dispatch.yml lives under .fullsend/.
func RenderTemplate ¶ added in v0.19.0
func RenderTemplate(path string, content []byte, opts RenderOptions) ([]byte, error)
RenderTemplate applies vendoring-aware substitutions to scaffold templates. Substitutions are fixed string replacements (not text/template), so only compile-time constants are injected into workflow YAML.
func ResolveVendoredCleanupPaths ¶ added in v0.19.0
func ResolveVendoredCleanupPaths(ctx context.Context, client forge.Client, owner, repo, workflowPrefix, binaryPath string) ([]string, error)
ResolveVendoredCleanupPaths returns paths to delete when disabling --vendor. Prefers the committed manifest; falls back to embed enumeration for legacy installs. binaryPath is included when no manifest is present (per-org or per-repo default).
func VendorManifestPath ¶ added in v0.19.0
VendorManifestPath returns the manifest path for the install mode.
func VendoredMarkerPath ¶ added in v0.19.0
func VendoredMarkerPath() string
VendoredMarkerPath returns the path used to detect a vendored install.
func WalkFullsendRepo ¶
WalkFullsendRepo calls fn for each file in the fullsend-repo scaffold that should be installed into a .fullsend repo. Files in layered directories (agents/, skills/, etc.) and upstream-only directories (.github/actions/, .github/scripts/) are skipped — they are provided at runtime by reusable workflows. See ADR 0035.
func WalkFullsendRepoAll ¶ added in v0.8.0
WalkFullsendRepoAll calls fn for every file in the fullsend-repo scaffold, including layered and upstream-only files. Used by tests that validate embedded content.
func WalkLayeredContent ¶ added in v0.19.0
WalkLayeredContent calls fn for layered directories and .github/scripts from fullsend-repo.
Types ¶
type CollectInstallFilesOptions ¶ added in v0.19.0
type CollectInstallFilesOptions struct {
RenderOptions
PathPrefix string
}
CollectInstallFilesOptions controls which scaffold files are collected.
type InstallFile ¶ added in v0.19.0
InstallFile is a file to commit during install.
type InstallFiles ¶ added in v0.19.0
type InstallFiles []InstallFile
InstallFiles is the slice type returned by install collectors.
func CollectInstallFiles ¶ added in v0.19.0
func CollectInstallFiles(opts CollectInstallFilesOptions) (InstallFiles, error)
CollectInstallFiles gathers scaffold files for org or per-repo installation.
func CollectPerRepoInstallFiles ¶ added in v0.19.0
func CollectPerRepoInstallFiles(vendored bool, upstreamRef, upstreamTag string) (InstallFiles, error)
CollectPerRepoInstallFiles gathers files for per-repo installation.
func CollectVendoredAssets ¶ added in v0.19.0
func CollectVendoredAssets(root, workflowPrefix string) (InstallFiles, error)
CollectVendoredAssets gathers files for --vendor installs. Upstream mirror content lives under .defaults/ (same layout as runtime sparse checkout). Reusable workflows are written under workflowPrefix (.fullsend/ for per-repo, "" for per-org).
type RenderOptions ¶ added in v0.19.0
type RenderOptions struct {
Vendored bool
PerRepo bool
UpstreamRef string // commit SHA to pin workflow refs to; empty = use DefaultUpstreamRef
UpstreamTag string // version tag for traceability comment (e.g. "v0.19.0")
RunnerImage string // GitHub Actions runner image; empty = use DefaultGHRunner
}
RenderOptions controls install-time substitution for shim and thin-caller templates.
func RenderOptionsForInstall ¶ added in v0.19.0
func RenderOptionsForInstall(vendored, perRepo bool, upstreamRef, upstreamTag string) RenderOptions
RenderOptionsForInstall builds render options from the --vendor flag.
type VendorManifest ¶ added in v0.19.0
type VendorManifest struct {
Version string `yaml:"version"`
CLIVersion string `yaml:"cli_version,omitempty"`
SourceRef string `yaml:"source_ref,omitempty"`
BinaryPath string `yaml:"binary_path"`
Paths []string `yaml:"paths"`
}
VendorManifest records paths written by a --vendor install for cleanup and analyze.
func NewVendorManifest ¶ added in v0.19.0
func NewVendorManifest(cliVersion, sourceRef, binaryPath string, contentPaths []string) *VendorManifest
NewVendorManifest builds a manifest from install outputs.
func ParseVendorManifest ¶ added in v0.19.0
func ParseVendorManifest(data []byte) (*VendorManifest, error)
ParseVendorManifest parses manifest YAML from the config repo.
func ReadVendorManifest ¶ added in v0.19.0
func ReadVendorManifest(ctx context.Context, client forge.Client, owner, repo, workflowPrefix string) (*VendorManifest, bool, error)
ReadVendorManifest loads the manifest from a repo when present.
func (*VendorManifest) CleanupPaths ¶ added in v0.19.0
func (m *VendorManifest) CleanupPaths(workflowPrefix string) []string
CleanupPaths returns all repo paths to delete, including the manifest file.
func (*VendorManifest) MarshalYAML ¶ added in v0.19.0
func (m *VendorManifest) MarshalYAML() ([]byte, error)
MarshalYAML serializes the manifest.