document

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package document 负责双语 release-note 文档、来源链接和 Release 正文校验。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangelogCompareLabel

func ChangelogCompareLabel(version, previous string) string

ChangelogCompareLabel 返回版本说明底部的比较链接文字。

func ChangelogCompareLink(version, previous string) string

ChangelogCompareLink 返回版本说明底部的比较链接。

func IsSemanticVersion

func IsSemanticVersion(version string) bool

IsSemanticVersion 判断不带 v 前缀的版本字符串是否符合 release-note 契约。

func ReadAuditReport

func ReadAuditReport(path string) (model.AuditReport, error)

ReadAuditReport 读取 validate 共用的 audit JSON 报告。

func RenderGitHubReleaseBody

func RenderGitHubReleaseBody(directory, version string) (string, error)

RenderGitHubReleaseBody 从双语 changelog 生成稳定的 GitHub Release 正文。

func RunRender

func RunRender(arguments []string) error

RunRender 执行 render 子命令。

func RunValidate

func RunValidate(arguments []string) error

RunValidate 执行 validate 子命令。

func ValidateReleaseDirectory

func ValidateReleaseDirectory(directory, version, previous string) error

ValidateReleaseDirectory 检查可发布的双语版本文件。

func ValidateSourceCoverage

func ValidateSourceCoverage(directory, version, previous string, report model.AuditReport) error

ValidateSourceCoverage 将 changelog 中的来源逐项对照审计报告。 发布说明是人工维护的唯一内容来源,因此允许审计区间内存在未列入 notes 的来源; 但 notes 不能引用区间之外或无法解析的 PR/commit。

Types

This section is empty.

Jump to

Keyboard shortcuts

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