Coder Social home page Coder Social logo

sarumaj / gh-gr Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 7.88 MB

github-cli extension allowing to manage multiple github repositories at once

Home Page: https://pkg.go.dev/github.com/sarumaj/gh-gr/v2

License: MIT License

Go 99.16% Shell 0.84%
gh-cli gh-extension golang github-repo

gh-gr's Introduction

test_and_report build_and_release Go Report Card Maintainability Test Coverage Go Reference Go version Release Release Date Commits since latest release Downloads (all assets, all releases) Downloads (all assets, latest release)


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 addressed 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]
>
> Examples:
>   gh gr --concurrency 100 --timeout "20s" <subcommand>
>
> Available Commands:
>   cleanup     Clean up untracked local repositories
>   completion  Generate the autocompletion script for the specified shell
>   edit        Edit configuration
>   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

gh-gr's People

Contributors

dependabot[bot] avatar sarumaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gh-gr's Issues

Notification of upcoming breaking change in go-gh config package

Hello gh extension author!

We noticed that you are making use of the config package from go-gh. While this package is documented as for internal use only, we understand that sometimes extension authors do so at their own risk. While we don’t provide support for this right now, we do want to make you aware of a breaking change when you pull in the next version so that you aren’t caught by surprise.

Oh no! What do you need to do?

Fortunately the change is minor, we changed the Read function signature to accept a fallback *Config if no persisted configuration is found. This means that you will need to now provide nil in each location you call config.Read.

From looking at your source code, we don’t believe there should be any other impact at compile or run time.

Cheers,

The CLI team.

basic alias seems broken ?

BTW thanks for this excellent extension.

# https://github.com/cli/cli/releases/tag/v2.43.1
go install github.com/cli/cli/v2/cmd/[email protected]

gh extension install sarumaj/gh-gr

gh ext list
NAME         REPO                VERSION
gh doctor    tekumara/gh-doctor  v0.0.2
gh gr        sarumaj/gh-gr       v2.6.9
gh pr-count  chaspy/gh-pr-count  v0.3.2

 gh doctor auth
✓ Authenticated to github.com as gedw99 using token with scopes admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages

 gh gr      
FATAL invalid argument           

If there are versions of the Cli your dependent on then let me know.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.