jira

package
v0.0.0-...-d0bb59c Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectDPTP = "DPTP"

	IssueTypeBug   = "Bug"
	IssueTypeStory = "Story"
	IssueTypeTask  = "Task"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

type Fake struct {
	// contains filtered or unexported fields
}

Fake is an injectable IssueFiler

func NewFake

func NewFake(calls map[IssueRequest]IssueResponse) *Fake

NewFake creates a new fake filer with the injected behavior

func (*Fake) FileIssue

func (f *Fake) FileIssue(issueType, title, description, reporter string, logger *logrus.Entry) (*jira.Issue, error)

FileIssue files the issue using injected behavior

func (*Fake) Validate

func (f *Fake) Validate(t *testing.T)

Validate ensures that all expected client calls happened

type IssueFiler

type IssueFiler interface {
	FileIssue(issueType, title, description, reporter string, logger *logrus.Entry) (*jira.Issue, error)
}

IssueFiler knows how to file an issue in Jira

func NewIssueFiler

func NewIssueFiler(slackClient *slack.Client, jiraClient *jira.Client) (IssueFiler, error)

type IssueRequest

type IssueRequest struct {
	IssueType, Title, Description, Reporter string
}

IssueRequest describes a client call to file an issue

type IssueResponse

type IssueResponse struct {
	Issue *jira.Issue
	Error error
}

IssueResponse describes a client response for filing an issue

Jump to

Keyboard shortcuts

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