issues

package
v0.0.0-...-614ca16 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColumnInDevelopment    = "In Development"
	ColumnWaitingForMerge  = "Ready for Merge"
	ColumnWaitingForDeploy = ""
	ColumnInProgress       = "In Progress"
	ColumnWaitingForUAT    = "UAT"
	ColumnDone             = "Done"
	ColumnClosed           = "Closed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnMapping

type ColumnMapping map[string]string

func (ColumnMapping) ReverseLookup

func (c ColumnMapping) ReverseLookup(name string) string

type Estimate

type Estimate struct {
	Value int
}

type Issue

type Issue struct {
	ID              string   `yaml:"number,omitempty"`
	Org             string   `yaml:"org,omitempty"`
	Repo            string   `yaml:"repo,omitempty"`
	Body            string   `yaml:"body,omitempty"`
	Assignee        string   `yaml:"assignee,omitempty"`
	Assignees       []string `yaml:"assignees,omitempty"`
	Milestone       *int     `yaml:"milestone,omitempty"`
	Estimate        int      `yaml:"estimate,omitempty"`
	Epics           []string `yaml:"epics,omitempty"`
	Releases        []string `yaml:"releases,omitempty"`
	Title           string   `yaml:"title,omitempty"`
	ProgressState   string   `yaml:"progressState,omitempty"`
	ProgressStateID int      `yaml:"progressStateId,omitempty"`
	BranchPattern   string   `yaml:"branchPattern,omitempty"`
	Labels          []string `yaml:"labels,omitempty"`

	IsClosed bool `yaml:"isClosed,omitempty"`

	GithubRepoID        *int64 `yaml:"githubRepoId,omitempty"`
	MappedProgressState string `yaml:"mappedProgressState,omitempty"`
}

func GetIssuesFromRefs

func GetIssuesFromRefs(svc IssueService, refs []IssueRef) ([]Issue, error)

func GetIssuesFromRefsErr

func GetIssuesFromRefsErr(svc IssueService, refs []IssueRef, err error) ([]Issue, error)

func (Issue) Ref

func (i Issue) Ref() IssueRef

func (Issue) RefPtr

func (i Issue) RefPtr() *IssueRef

func (Issue) Slug

func (i Issue) Slug() string

type IssueRef

type IssueRef struct {
	RepoRef
	ID string
}

func NewIssueRef

func NewIssueRef(org, repo string, id string) IssueRef

func ParseIssueRef

func ParseIssueRef(raw string) (IssueRef, error)

func (*IssueRef) MarshalYAML

func (f *IssueRef) MarshalYAML() (interface{}, error)

func (IssueRef) Parts

func (s IssueRef) Parts() (org string, repo string, id string, err error)

func (IssueRef) String

func (s IssueRef) String() string

func (*IssueRef) UnmarshalYAML

func (f *IssueRef) UnmarshalYAML(unmarshal func(interface{}) error) error

type IssueService

type IssueService interface {
	// Assign the user who created the task, attach body and milestone
	Create(issue Issue) (string, error)
	// Add dependency relationship : the newly created task should be a dependency of the issue issue on the ZenHub board
	AddDependency(from, to IssueRef, parentIssueNum string) error
	RemoveDependency(from, to IssueRef) error
	// Put the task and depending issue into In Progress column on the ZenHub board
	SetProgress(issue IssueRef, column string) error
	ChangeLabels(ref IssueRef, add []string, remove []string) error
	GetParentRefs(issue IssueRef) ([]IssueRef, error)
	GetChildRefs(issue IssueRef) ([]IssueRef, error)
	GetIssue(issue IssueRef) (Issue, error)
	GetClosedIssue(org, repoName string) ([]int, error)
}

type RepoRef

type RepoRef struct {
	Org  string
	Repo string
}

func ParseRepoRef

func ParseRepoRef(raw string) (RepoRef, error)

func (RepoRef) MarshalYAML

func (r RepoRef) MarshalYAML() (interface{}, error)

func (RepoRef) OrgAndRepo

func (r RepoRef) OrgAndRepo() (string, string)

func (RepoRef) String

func (r RepoRef) String() string

func (*RepoRef) UnmarshalYAML

func (r *RepoRef) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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