gh-orgsync

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 12 Imported by: 0

README

gh-orgsync

A GitHub (gh) CLI extension to sync all repos from a GitHub organization. Leverages Go concurrency to speed things up. The extension will get a list of repos in the org and a list of the repos in the target local path and create an action plan.

  • Repos that do not exist locally will be cloned
  • Repos that exist locally and in the org will be updated (git fetch)
  • Repos that exist locally but not in the org will not be touched, but can be reported

Installation

  1. Install the gh CLI - see the installation

    Installation requires a minimum version (2.0.0) of the the GitHub CLI that supports extensions.

  2. Install this extension:

    gh extension install mantzas/gh-orgsync
    

Flags

The extension contains multiple required and optional flags.

  • Org --org {{orgname}} which is the org we want to sync. It is the only required flag
  • Path `--path {{path to local folder}} which defines the folder to sync to
  • Degree Of Parallelism --dop n which will define the number of workers which will be used
  • Dry Run --dry-run which will only report the action which would be taken
  • ReportFields --report x,y,z which allows reporting options (error, cloned, synced and other)
  • Verbose --verbose which enable verbose logging

Usage

Run:

gh orgsync --org {{add your GH org here}}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL