cloneorg

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2017 License: MIT Imports: 6 Imported by: 0

README

clone-org

Release Software License Travis

Go Report Card Godoc SayThanks.io

A simple command line tool to clone all repos of a given organization.

I needed to do that so I can grep all repos for some stuff. GitHub search wasn't powerful enough to do what I needed, so, here it is.

Install

brew install caarlos0/tap/clone-org

Usage

NAME:
   clone-org - Clone all repos of a github organization

USAGE:
   main [global options] command [command options] [arguments...]

VERSION:
   0.0.0

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --org value, -o value
   --token value, -t value         [$GITHUB_TOKEN]
   --destination value, -d value
   --help, -h                     show help
   --version, -v                  print the version

Notes

  • if no destination is provided, the clone will be made in /tmp/organization-name
  • a git clone --depth 1 will be performed, meaning that only the last commit of the default branch will be available. On future versions this may be configurable.

Documentation

Overview

Package cloneorg contains useful functions to find and clone a github organization repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(repo Repo, destination string) error

Clone a given repository into a given destination

Types

type Repo

type Repo struct {
	Name string
	URL  string
}

Repo represents the repository data we need.

func AllOrgRepos

func AllOrgRepos(token, org string) (repos []Repo, err error)

AllOrgRepos finds all repositories of a given organization

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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