Documentation
¶
Index ¶
- func Add(root string, paths ...string) error
- func ChangedChangeFilesSinceRef(root, ref string) ([]string, error)
- func Commit(root, message string) error
- func ContributorsSince(root, previousTag string) []string
- func CreateTag(root, tag string) error
- func CurrentBranch(root string) (string, error)
- func CurrentCommit(root string) (string, error)
- func DerivePRNumber(root, filename string) int
- func LatestPrereleaseNumber(root, base, label string) (int, error)
- func LatestStableTag(root, prefix string) (string, error)
- func LatestTagMatching(root string, patterns []*regexp.Regexp) (string, error)
- func Maintainers(root string) map[string]bool
- func ShortSHA(root string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangedChangeFilesSinceRef ¶
ChangedChangeFilesSinceRef returns basenames of .changes/*.md files added since ref (exclusive) up to HEAD. When ref is empty, the full history is searched. Files matching readme.md or _headline.md are excluded.
func ContributorsSince ¶
ContributorsSince returns the deduplicated commit-author logins (preserving first-seen order, case-insensitive dedup) between previousTag and HEAD via gh api. No filtering: bots and maintainers are included. previousTag must be a real ref (the literal tag, including prefix), not a bare version. Returns nil if gh is unavailable or previousTag is empty.
func CurrentBranch ¶
func CurrentCommit ¶
func DerivePRNumber ¶
DerivePRNumber finds the PR that introduced .changes/<filename> via gh api. Returns 0 if gh is unavailable or the commit has no associated PR.
func LatestPrereleaseNumber ¶
LatestPrereleaseNumber returns the highest N seen in tags of the form base-label.N or base-label.N+<anything> (semver build metadata).
func LatestStableTag ¶
func LatestTagMatching ¶
LatestTagMatching returns the name of the most recently created tag that matches any of the provided patterns. Returns "" when no tag matches.
func Maintainers ¶
Maintainers returns the set of repo collaborator logins (lowercased) that have admin or maintain permission, used to exclude them from the contributors footer. Returns nil if gh is unavailable (e.g. the token lacks push access), in which case no maintainer filtering is applied.
Types ¶
This section is empty.