Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsConventionalDefaultName ¶ added in v0.3.11
IsConventionalDefaultName reports whether s is a well-known default branch or label name ("main", "master", "develop", "trunk"). It was preserved for future use even though its original caller (the GetMeta carve-out in github/getrepo.go and bitbucket/getrepo.go) was removed in Phase 25.
func IsSHA ¶ added in v0.3.11
IsSHA reports whether s is a 40-char (SHA-1) or 64-char (SHA-256) lowercase hex string. This is the shared provider-layer definition extracted from the duplicated copies in github/getrepo.go and bitbucket/getrepo.go. The connect-layer isSHA in internal/connect/commits_helpers.go is NOT consolidated because it serves a different domain (UUID-derivation gating vs. provider-layer commit-vs-ref gating).
Types ¶
type File ¶
func GetFiles ¶
func GetFiles( ctx context.Context, entries []FileEntry, downloadFn func(ctx context.Context, orig string) ([]byte, error), ) ([]File, error)
GetFiles downloads each entry using downloadFn, hashes the data, and returns a sorted content.File slice. The caller provides the downloadFn so this helper is provider-agnostic.
type FileEntry ¶
FileEntry represents a filtered file entry. Orig is the original path used for API calls. Name is the filtered/rewritten path used for content.File.Path.
func FilterEntries ¶
FilterEntries applies repo.Check() to each raw entry and returns a sorted FileEntry slice of entries that pass the filter. The getPath function extracts the file path string from each entry of type T.