Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdChange = &cobra.Command{
Use: "changelog",
Short: "获取phantasm变更日志",
Long: `获取phantasm发布版本或提交信息。例如:phantasm changelog dev 或 phantasm changelog {version}`,
Run: run,
}
CmdChange 是phantasm变更日志工具
Functions ¶
func ParseCommitsInfo ¶
func ParseCommitsInfo(info []CommitInfo) string
ParseCommitsInfo 解析提交信息生成Markdown
func ParseGithubURL ¶
ParseGithubURL 解析GitHub URL获取所有者和仓库名
Types ¶
type CommitInfo ¶
type CommitInfo struct {
Commit struct {
Message string `json:"message"`
} `json:"commit"`
}
CommitInfo 保存提交信息结构
type GithubAPI ¶
GithubAPI 用于请求GitHub API的结构
func (*GithubAPI) GetCommitsInfo ¶
func (g *GithubAPI) GetCommitsInfo() []CommitInfo
GetCommitsInfo 获取phantasm提交信息
func (*GithubAPI) GetReleaseInfo ¶
func (g *GithubAPI) GetReleaseInfo(version string) ReleaseInfo
GetReleaseInfo 获取phantasm发布信息
Click to show internal directories.
Click to hide internal directories.