changelogcheck

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package changelogcheck verifies that a CHANGELOG markdown file contains an entry for a given release version. It is used by the release workflow to fail a tag push when the changelog has not been updated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFile

func CheckFile(parsePath string, parseVersion string) (bool, error)

CheckFile reads the file at parsePath and calls HasEntry with parseVersion. It returns an error when the file cannot be read.

func HasEntry

func HasEntry(parseChangelog string, parseVersion string) bool

HasEntry reports whether parseChangelog contains a "## " section header whose text includes parseVersion as a whole token. Both the query and the matched header text are normalized by stripping a leading 'v' before comparison. Bracket wrappers like "[3.0.46]" and trailing date suffixes like "- 2026-06-12" are tolerated. Substring matches are rejected: "3.0.4" does NOT match "## 3.0.46".

func LatestEntry

func LatestEntry(parseChangelog string) (parseHeader string, parseBody string, parseOk bool)

LatestEntry returns the first "## " section's header text (without the "## " prefix) and its body (all lines until the next "## " or EOF). An optional leading "# Changelog" H1 line is skipped. parseOk is false when parseChangelog contains no "## " section.

Types

This section is empty.

Directories

Path Synopsis
cmd
changelogcheck command
Command changelogcheck exits non-zero when CHANGELOG.md has no section entry for the given version, so a release workflow can gate a tag on a changelog entry.
Command changelogcheck exits non-zero when CHANGELOG.md has no section entry for the given version, so a release workflow can gate a tag on a changelog entry.

Jump to

Keyboard shortcuts

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