From d93ab0b90aca9401b32371ca4d1f0a2d8fbf3a44 Mon Sep 17 00:00:00 2001 From: Jay Gabriels Date: Fri, 30 Mar 2018 07:36:01 -0700 Subject: [PATCH 1/2] update readme --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37fd20d..1fe6506 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@ Github search is terrible. The idea here is quickly clone all org repos into a s ### Use - `$ ghorg nameoforg` +### Setup +1. `git clone` +1. `cd ghorg` +1. `$cp .env-sample .env` +2. update .env +3. `$ go install` + ### Auth -- `$cp .env-sample .env` add your personal access token - If org is behind SSO add it to the token https://help.github.com/articles/authorizing-a-personal-access-token-for-use-with-a-saml-single-sign-on-organization/ From 20b3188d276ead5e01dfbf01252f2df0046f65ed Mon Sep 17 00:00:00 2001 From: Jay Gabriels Date: Fri, 30 Mar 2018 07:41:27 -0700 Subject: [PATCH 2/2] make public func private --- cmd/clone.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/clone.go b/cmd/clone.go index 01e0dcf..516e340 100644 --- a/cmd/clone.go +++ b/cmd/clone.go @@ -46,7 +46,7 @@ func getAllOrgCloneUrls() ([]string, error) { return cloneUrls, nil } -func CreateDirIfNotExist() { +func createDirIfNotExist() { clonePath := os.Getenv("ABSOLUTE_PATH_TO_CLONE_TO") if _, err := os.Stat(clonePath); os.IsNotExist(err) { err = os.MkdirAll(clonePath, 0755) @@ -73,7 +73,7 @@ func getAppNameFromURL(url string) string { // CloneAllReposByOrg clones all repos for a given org func CloneAllReposByOrg() { resc, errc := make(chan string), make(chan error) - CreateDirIfNotExist() + createDirIfNotExist() cloneTargets, err := getAllOrgCloneUrls() if err != nil {