Пример #1
0
func CurrentProject() *Project {
	remote, err := git.Remote()
	utils.Check(err)

	owner, name := parseOwnerAndName(remote)

	return &Project{name, owner}
}
Пример #2
0
func parseOwnerAndName() (name, remote string) {
	remote, err := git.Remote()
	utils.Check(err)

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

	return url[1], url[2]
}