示例#1
0
文件: project.go 项目: jroes/gh
func CurrentProject() *Project {
	remote, err := git.Remote()
	utils.Check(err)

	owner, name := parseOwnerAndName(remote)

	return &Project{name, owner}
}
示例#2
0
文件: project.go 项目: prsimp/gh
func parseOwnerAndName() (name, remote string) {
	remote, err := git.Remote()
	utils.Check(err)

	url, err := mustMatchGitHubURL(remote)
	utils.Check(err)

	return url[1], url[2]
}