common

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2014 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrReleaseNotFound = errors.New("release not found")

Functions

This section is empty.

Types

type CodeReviewTool

type CodeReviewTool interface {
	PostReviewRequest(commit *git.Commit, options map[string]interface{}) error
}

type Config

type Config interface {
	IssueTrackerId() string
	CodeReviewToolId() string
}

func LoadConfig

func LoadConfig() (Config, error)

LoadConfig returns the config that is useful for modules in general.

Even when an error is returned, Config can be partially filled in in case the error being returned is a validation error.

type IssueTracker

type IssueTracker interface {

	// CurrentUser returns the issue tracker account details of the current user.
	// The account ID is taken from the global SalsaFlow configuration file.
	CurrentUser() (User, error)

	// StartableStories returns the list of stories that can be started.
	StartableStories() ([]Story, error)

	// StoriesInDevelopment returns the list of stories that are being developed.
	StoriesInDevelopment() ([]Story, error)

	// NextRelease is a factory method for creating release objects
	// representing the releases that have not been started yet.
	//
	// The current version is the version on the trunk branch,
	// the next version is the next trunk version, i.e. the version that is bumped
	// to the trunk branch once the release branch is created.
	NextRelease(current *version.Version, next *version.Version) (NextRelease, error)

	// RunningRelease is a factory method for creating release objects
	// representing the releases that have been started.
	RunningRelease(*version.Version) (RunningRelease, error)

	// SelectActiveStoryIds returns the IDs associated with the stories
	// that are being actively worked on, i.e. they are not closed yet.
	SelectActiveStoryIds(ids []string) (activeIds []string, err error)

	// OpenStory opens the given story in the web browser.
	OpenStory(storyId string) error
}

type LocalConfig

type LocalConfig struct {
	IssueTrackerId   string `yaml:"issue_tracker"`
	CodeReviewToolId string `yaml:"code_review_tool"`
}

type NextRelease

type NextRelease interface {
	PromptUserToConfirmStart() (bool, error)
	Start() (action.Action, error)
}

type RunningRelease

type RunningRelease interface {
	Version() *version.Version
	Stories() ([]Story, error)
	EnsureStageable() error
	Stage() (action.Action, error)
	Releasable() (bool, error)
	Release() error
}

type Story

type Story interface {
	Id() string
	ReadableId() string
	Title() string

	Assignees() []User
	AddAssignee(User) *errs.Error
	SetAssignees([]User) *errs.Error

	Start() *errs.Error

	// LessThan is being used for sorting stories for output.
	// Stories are printed in the order they are sorted by this function.
	LessThan(Story) bool
}

type User

type User interface {
	Id() string
}

Jump to

Keyboard shortcuts

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