utils

package
v0.0.0-...-2cebd77 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLatestCommit

func GetLatestCommit(data string) string

获取最新提交comment

func GetPushUser

func GetPushUser(data string) (user string)

解析push用户名

func GetRepoBranch

func GetRepoBranch(data string) (string, error)

解析请求体中的分支数据

func GetRepoName

func GetRepoName(data string) (oname, name string, error error)

解析请求体中的仓库名称

func IsRemote

func IsRemote(host conf.HostConfig) (ok bool)

判断是否为远程主机

func PathExists

func PathExists(path string) (bool, error)

func ResponseFormat

func ResponseFormat(c *gin.Context, code int, msg string)

Types

type WebHookInfo

type WebHookInfo struct {
	Url      string
	Pusher   string
	RepoName string
	Comment  string
	Branch   string
}

func NewWebHookInfo

func NewWebHookInfo() *WebHookInfo

Jump to

Keyboard shortcuts

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