githubrepos

package module
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

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.

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 get

go get https://github.com/sanemat/go-githubrepos/cmd/github-repos

Design

design

Changelog

chagelog by git-chglog

License

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

Credits

credits by gocredits

Documentation

Index

Constants

View Source
const EnvGitHubTokenKey = "GITHUB_TOKEN"

EnvGitHubTokenKey Key of GitHub Token on environment variables

Variables

This section is empty.

Functions

func Run

func Run(argv []string, token string, outStream, errStream io.Writer) error

Run command

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL