git

package
v0.1.0-alpha.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(root string, paths ...string) error

func ChangedChangeFilesSinceRef

func ChangedChangeFilesSinceRef(root, ref string) ([]string, error)

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 Commit

func Commit(root, message string) error

func ContributorsSince

func ContributorsSince(root, previousTag string) []string

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 CreateTag

func CreateTag(root, tag string) error

func CurrentBranch

func CurrentBranch(root string) (string, error)

func CurrentCommit

func CurrentCommit(root string) (string, error)

func DerivePRNumber

func DerivePRNumber(root, filename string) int

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

func LatestPrereleaseNumber(root, base, label string) (int, error)

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 LatestStableTag(root, prefix string) (string, error)

func LatestTagMatching

func LatestTagMatching(root string, patterns []*regexp.Regexp) (string, error)

LatestTagMatching returns the name of the most recently created tag that matches any of the provided patterns. Returns "" when no tag matches.

func Maintainers

func Maintainers(root string) map[string]bool

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.

func ShortSHA

func ShortSHA(root string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL