Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sanemat/go-githubrepos

github-repos -z -search "org:yourorg archived:false"
https://github.com/sanemat/go-githubrepos

cli github go golang

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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.
- [How to clone all repositories in a Github Organization](https://medium.com/@kevinsimper/how-to-clone-all-repositories-in-a-github-organization-8ccc6c4bd9df)
- [Cloning All Repositories in a GitHub Organization - Scott's Weblog - The weblog of an IT pro focusing on cloud computing, Kubernetes, Linux, containers, and networking](https://blog.scottlowe.org/2018/07/19/cloning-all-repositories-in-a-github-organization/)
- [Clone all repos from a GitHub organization](https://gist.github.com/caniszczyk/3856584)

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 :sweat_smile:

I tried [caarlos0/clone-org](https://github.com/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](./design.md)

## Changelog

[chagelog](./changelog.md) by [git-chglog](https://github.com/git-chglog/git-chglog)

## License

Copyright 2019 Matt (Sanemat) (Murahashi Kenichi)
[Apache License Version 2.0](./license.txt)

## Credits

[credits](./credits.txt) by [gocredits](https://github.com/Songmu/gocredits/)