Skip to content

sejoharp/reposync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A tool to keep local repos up to date and clone new repos from a given team.

Usage

reposync

Installation

install release

bash -c "$(curl -fsSL https://raw.githubusercontent.com/sejoharp/reposync/refs/heads/main/scripts/install.sh)"

install from source

# install rust
brew install rustup-init

# build and install reposync
make install

install local with nix

nix build

install via nix home-manager

# move to home-manager config. e.g.:
cd ~/.config/home-manager

# add this as input;
    reposyncpkg = {
      url = "github:sejoharp/reposync";
    };

# optional: update index
nix flake lock --update-input reposyncpkg

# add this to packages:
inputs.reposyncpkg.packages.${pkgs.stdenv.system}.default

# build generation
nh home build .

# switch generation
nh home switch .

set config

export GITHUB_TEAM_REPO_URL=https://api.github.com/organizations/[org-id]/team/[team-id]/repos
export REPO_ROOT_DIR=[dir/to/repo/root]
export GITHUB_TEAM_PREFIX=team_
export GITHUB_TOKEN=ghp_56789

Development

create a release

# bump version (patch by default)
make version-update

# create a git commit
git add ...
git commit ...

# tag the commit
make tag-release

# push commit and tag
make push-release

benchmarks

single threaded

cargo run 3.21s user 4.07s system 6% cpu 1:51.83 total

tokio spawn

cargo run 1.78s user 1.88s system 24% cpu 14.688 total

cargo run 1.71s user 1.73s system 30% cpu 11.267 total

tokio spawn_blocking

cargo run 1.62s user 2.17s system 71% cpu 5.344 total

About

Clones new team repos and pulls changes of already cloned repos.

Resources

License

Stars

Watchers

Forks

Packages

No packages published