Skip to content

xbglowx/github-org-repos-sync

Repository files navigation

github-org-repos-sync Build and Test golangci-lint CodeQL

Sync GitHub organization repos

Build

  1. git clone [email protected]:xbglowx/github-org-repos-sync.git
  2. go get -d .
  3. go build .

Auth

  1. Authenticated access to the GitHub API via personal access token with scope repo
    • export GITHUB_TOKEN=<token>
  2. git cli authenticated to GitHub

How It Works

  1. Generates a list of repos the caller has access to within the specified organization
  2. Clones each repo if it doesn't exist locally in the destionation path
  3. If the repo already exists:
    1. Switches to the default branch, only if the current branch is clean; Stashes if dirty
    2. Updates

Usage

  1. ./github-org-repos-sync --help

About

Sync github org repos

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages