Sync GitHub organization repos
git clone git@github.com:xbglowx/github-org-repos-sync.git
go get -d .
go build .
- Authenticated access to the GitHub API via personal access token with scope repo
export GITHUB_TOKEN=<token>
git
cli authenticated to GitHub
- Generates a list of repos the caller has access to within the specified organization
- Clones each repo if it doesn't exist locally in the destionation path
- If the repo already exists:
- Switches to the default branch, only if the current branch is clean; Stashes if dirty
- Updates
./github-org-repos-sync --help