Skip to content

sanemat/go-githubrepos

Repository files navigation

githubrepos

List repos up on GitHub Search.

Overview

github-repos -z -search "org:yourorg archived:false" returns github ssh clone url on yourorg, split by NULL. This returns all non-archived repos.

Usage

github-repos -search "org:packsaddle" -z | xargs -0 -P 4 -I {} git clone {} --depth 1

required: GITHUB_TOKEN=__YOUR_PERSONAL_TOKEN__

Motivation

There are several ways for cloning GitHub repositories in an organization.

But I don't want to see my personal token for GitHub. And I want to handle pagination because my organization has over 400 repos 😅

I tried caarlos0/clone-org, but sometimes I got errors.

Install

ghg

ghg get sanemat/go-githubrepos

go install

go install github.com/sanemat/go-githubrepos/cmd/github-repos@latest

Design

design

Changelog

chagelog by git-chglog

License

Copyright 2019 Matt (Sanemat) (Murahashi Kenichi) Apache License Version 2.0

Credits

credits by gocredits

About

github-repos -z -search "org:yourorg archived:false"

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors