command

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package command is responsible for executing all the CLI commands (eg: start)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	IssueTracker   issuetracker.IssueTracker
	GitRepo        gitrepo.GitRepo
	VersionControl versioncontrol.VersionControl
}

Command struct is responsable for execute CLI commands

func New

func New(params NewParams) (*Command, error)

New is a function to create a new Command struct

func (*Command) Start

func (c *Command) Start(ID, org, repo string) error

Start command flow: 1. fetch issue on a issue tracker 2. creates and pushes a branch to a git repository 3. creates a PR on a git repository 4. returns the PR link

type NewParams added in v0.2.0

type NewParams struct {
	IssueTracker   issuetracker.IssueTracker
	GitRepo        gitrepo.GitRepo
	VersionControl versioncontrol.VersionControl
}

NewParams is a struct passed as param to create a new Command struct

Jump to

Keyboard shortcuts

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