Documentation
¶
Overview ¶
Package document 负责双语 release-note 文档、来源链接和 Release 正文校验。
Index ¶
- func ChangelogCompareLabel(version, previous string) string
- func ChangelogCompareLink(version, previous string) string
- func IsSemanticVersion(version string) bool
- func ReadAuditReport(path string) (model.AuditReport, error)
- func RenderGitHubReleaseBody(directory, version string) (string, error)
- func RunRender(arguments []string) error
- func RunValidate(arguments []string) error
- func ValidateReleaseDirectory(directory, version, previous string) error
- func ValidateSourceCoverage(directory, version, previous string, report model.AuditReport) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangelogCompareLabel ¶
ChangelogCompareLabel 返回版本说明底部的比较链接文字。
func ChangelogCompareLink ¶
ChangelogCompareLink 返回版本说明底部的比较链接。
func IsSemanticVersion ¶
IsSemanticVersion 判断不带 v 前缀的版本字符串是否符合 release-note 契约。
func ReadAuditReport ¶
func ReadAuditReport(path string) (model.AuditReport, error)
ReadAuditReport 读取 validate 共用的 audit JSON 报告。
func RenderGitHubReleaseBody ¶
RenderGitHubReleaseBody 从双语 changelog 生成稳定的 GitHub Release 正文。
func ValidateReleaseDirectory ¶
ValidateReleaseDirectory 检查可发布的双语版本文件。
func ValidateSourceCoverage ¶
func ValidateSourceCoverage(directory, version, previous string, report model.AuditReport) error
ValidateSourceCoverage 将 changelog 中的来源逐项对照审计报告。 发布说明是人工维护的唯一内容来源,因此允许审计区间内存在未列入 notes 的来源; 但 notes 不能引用区间之外或无法解析的 PR/commit。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.