func GetRepoName() string { out, err := pipeline.Output( []string{"git", "config", "--get", "buranko.reponame"}, ) if err != nil { return "" } return strings.TrimRight(string(out), "\n") }
// TODO: Should move to git.go? func GetBranchNameFromGitCommand() string { out, err := pipeline.Output( []string{"git", "rev-parse", "--abbrev-ref", "HEAD"}, ) if err != nil { fmt.Println(err) os.Exit(1) } return string(out) }