1 unstable release
Uses old Rust 2015
0.1.0 | Aug 18, 2017 |
---|
#11 in #git-hub
18KB
236 lines
ghopac - GitHub Organization Pull And Clone
Utility to pull - and/or clone if missing on local disk - all repos you have access to from one or more Github organizations. Will also pull
from additional repos that you have already cloned if specified in the configuration file - these do not need to belong to any particular Github organizations.
Building from source
- Install rust (you may need to install cargo separately depending on your platform/distribution)
- Change to the top level source directory
- Build the binary by running
cargo build --release
; your optimized binary should be in./target/release/ghopac
- [Optional] Run
cargo install
to placeghopac
in your${HOME}/.cargo/bin
directory; add to yourPATH
if desired
Using
-
Get a Github access token at https://github.com/settings/tokens; minimum access should be reading your orgs and repos
-
Create a config file in
${XDG_CONFIG_HOME}/ghopac/config.json
, example below:{ "concurrency": 4, "verbose": true, "github_access_token": "<from step 1>", "orgs": [ { "org": "my_github_org", "path": "/my/base/code/dir/for/my_github_org" } ], "syncpoints": [ "/some/other/cloned/repo/dir", "/yet/another/separately/cloned/repo/dir" ] }
-
Run
ghopac
Configuration notes
- This program honors the XDG Base Directory Specification in looking for the location of your configuration file
- You don't have to use Github organizations, you can simply omit
orgs
and just usesyncpoints
concurrency
if left unspecified will default to 4syncpoints
do not have to belong to any particular Github organization; they are just local directories where you expectgit pull
to work correctly- If you have no configuration file, running the program will fail and output a sample file to get you started
TODO
- Add command line arguments that override the config file
- For orgs, add filtering in case having all repositories is overkill
- Check the issues list for more...
Dependencies
~8–17MB
~274K SLoC