discovery

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package discovery walks the repo for CHANGELOG.md files, applies the configured exclude list, derives module names from paths, and pairs each candidate with its module-specific most-recent tag.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModuleName

func ModuleName(changelogPath string) string

ModuleName returns the module name (directory) for a given changelog path. Root-level files return "".

func RemoveExcluded

func RemoveExcluded(paths, excludeDirs []string) []string

RemoveExcluded filters out paths whose directory matches any prefix in excludeDirs. Each excludeDir must be a directory path ending in "/".

Types

type Candidate

type Candidate struct {
	Path       string // repo-relative path to CHANGELOG.md
	ModuleName string // directory of the changelog ("" for repo root)
	LatestTag  string // "" when there is no prior tag for this module
}

Candidate is a single changelog that has actually been modified since its module's most recent tag (or has no prior tag).

type Discoverer

type Discoverer struct {
	// contains filtered or unexported fields
}

Discoverer pairs a vcs.Repo with discovery configuration.

func New

func New(repo vcs.Repo, excludeDirs []string) *Discoverer

New returns a Discoverer that reads from repo and applies excludeDirs as path prefixes (each entry should already end with "/").

func (*Discoverer) Find

func (d *Discoverer) Find(ctx context.Context) ([]Candidate, error)

Find returns the list of candidate changelogs to release.

Jump to

Keyboard shortcuts

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