gh-gr

module
v2.6.7 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT

README

test_and_report build_and_release Go Report Card Maintainability Test Coverage Go Reference


gh-gr

gh-gr is a GitHub repository management tool based on the project github-repo by Cristian Henzel.

Since the original project used a configuration file containing sensitive information, the issue has been adressed by reinventing the tool as an extension to the github cli (gh).

gh-gr demo

Installation

Prerequisites: github cli (gh)

To install gr:

$ gh extension install https://github.com/sarumaj/gh-gr

Usage

$ gh gr --help

> gr is a gh cli extension allowing management of multiple repositories at once
>
> Usage:
>   gr [flags]
>   gr [command]
>
> Available Commands:
>   cleanup     Clean up untracked local repositories
>   completion  Generate the autocompletion script for the specified shell
>   export      Export current configuration to stdout
>   help        Help about any command
>   import      Import configuration from stdin or a file
>   init        Initialize repository mirror
>   pull        Pull all repositories
>   push        Push all repositories
>   remove      Remove current configuration
>   status      Show status for all repositories
>   update      Update configuration
>   version     Display version information
>   view        Display current configuration
>
> Flags:
>   -c, --concurrency uint   Concurrency for concurrent jobs (default 12)
>   -h, --help               help for gr
>   -t, --timeout duration   Set timeout for long running jobs (default 10m0s)
>
> Use "gr [command] --help" for more information about a command.

First, create the configuration:

$ gh gr init -d SOMEDIR -c 10

or, if you are willing to exclude some repositories, you can use regular expressions:

$ gh gr init -c 10 -d SOMEDIR -e ".*repo1" -e "SOMEORG/repo-.*" -s

Run gh gr init --help or gh gr help init to retrieve more information about the init command.

After the configuration is created, you can pull all repositories using:

$ gh gr pull

you can view the status of the repositories using:

$ gh gr status

and you can push all repositories using:

$ gh gr push

After creating new repositories on the server or after user data changes, you can update the local configuration using:

$ gh gr update

Acknowledgments

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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