change

package
v2.0.0-...-f55f3a2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdChange = &cobra.Command{
	Use:   "changelog",
	Short: "Get a kratos change log",
	Long:  "Get a kratos release or commits info. Example: kratos changelog dev or kratos changelog {version}",
	Run:   run,
}

CmdChange is kratos change log tool

Functions

func ParseCommitsInfo

func ParseCommitsInfo(info []CommitInfo) string

func ParseGithubURL

func ParseGithubURL(url string) (owner string, repo string)

func ParseReleaseInfo

func ParseReleaseInfo(info ReleaseInfo) string

Types

type CommitInfo

type CommitInfo struct {
	Commit struct {
		Message string `json:"message"`
	} `json:"commit"`
}

type ErrorInfo

type ErrorInfo struct {
	Message string
}

type GithubAPI

type GithubAPI struct {
	Owner string
	Repo  string
	Token string
}

func (*GithubAPI) GetCommitsInfo

func (g *GithubAPI) GetCommitsInfo() []CommitInfo

GetCommitsInfo for getting kratos commits info.

func (*GithubAPI) GetReleaseInfo

func (g *GithubAPI) GetReleaseInfo(version string) ReleaseInfo

GetReleaseInfo for getting kratos release info.

type ReleaseInfo

type ReleaseInfo struct {
	Author struct {
		Login string `json:"login"`
	} `json:"author"`
	PublishedAt string `json:"published_at"`
	Body        string `json:"body"`
	HTMLURL     string `json:"html_url"`
}

Jump to

Keyboard shortcuts

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