github

package module
v1.11.0 Latest Latest
Warning

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

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

README

deploystack/github

This package contains code for communicating between github and DeployStack. This code is used primarily for tooling - getting repos so that other tools can download and look at code. It is also used by the main tool for pulling down content directly instead of relying on Open in Cloud Shell.

Documentation

Overview

Package github includes all of the client calls to github for building automation tools for deploystack

Index

Constants

View Source
const GITHUBHOST = "github.com"

GITHUBHOST is the hostname of where to find github on the web

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v1.11.0

type Option func(*Repo)

Option defines option functions that can be passed in to modify repos on New

func Branch added in v1.11.0

func Branch(b string) Option

Branch sets the branch on a repo

func Owner added in v1.11.0

func Owner(o string) Option

Owner sets the owner on a repo

func SiteURL added in v1.11.0

func SiteURL(u string) Option

SiteURL sets the owner, name, and branch of a repo based on a URL

type Repo added in v1.8.0

type Repo struct {
	Name        string `json:"name" yaml:"name"`
	Owner       string `json:"owner" yaml:"owner"`
	Branch      string `json:"branch" yaml:"branch"`
	Description string `json:"description" yaml:"description"`
}

Repo contains the details of a github repo for the purpose of downloading

func New added in v1.11.0

func New(name string, options ...Option) Repo

New generates Github from a series of options

func NewRepo deprecated added in v1.8.0

func NewRepo(repo string) Repo

NewRepo generates Github from a url that might contain branch information

Deprecated: Use New() Instead

func (Repo) Clone added in v1.8.0

func (r Repo) Clone(path string) error

Clone performs a git clone to the directory of our choosing

func (Repo) Path added in v1.8.0

func (r Repo) Path(path string) string

Path returns where this repo should exist locally given the input path

func (*Repo) Populate added in v1.11.0

func (r *Repo) Populate() error

Populate gets metadata from github

func (Repo) ReferenceName added in v1.8.0

func (r Repo) ReferenceName() string

ReferenceName is a shortcut to the reference for the current branch

func (Repo) URL added in v1.8.0

func (r Repo) URL() string

URL returns the github url of this repo

Jump to

Keyboard shortcuts

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