Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GithubAccessToken ¶
func GithubAccessToken(t string) option
func Organization ¶
func Organization(o string) option
func ProjectDir ¶
func ProjectDir(d string) option
Types ¶
type GithubRepository ¶
type GithubRepository struct {
Name string `mapstructure:"github-repo-name"`
ServerURL string `mapstructure:"github-enterprise-server-url"`
Organization string `mapstructure:"github-organization"`
GithubAccessToken string `mapstructure:"github-auth-token"`
License string `mapstructure:"license"`
ProjectDir string `mapstructure:"project-dir"`
Private bool `mapstructure:"private"`
CloneURL string
}
GithubRepository defines a github (enterprise) repo
func New ¶
func New(name string, options ...option) (*GithubRepository, error)
New creates a new GithubRepository configured with the provided options
func (GithubRepository) Clone ¶
func (r GithubRepository) Clone(output io.Writer) error
Clone performs a plain `git clone` of "url" as the project dir. If the output arg is supplied, progress is logged there.
func (*GithubRepository) Configure ¶
func (r *GithubRepository) Configure(opts ...option)
Configure allows us to modify the configuration of a GithubRepository
func (GithubRepository) Create ¶
func (r GithubRepository) Create() error
Create uses a GithubRepository to construct a Github (Enterprise) repo via API calls
func (GithubRepository) URL ¶
func (r GithubRepository) URL() (string, error)
Click to show internal directories.
Click to hide internal directories.