issues

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bugzilla = "bugzilla"
	Jira     = "jira"
	Trello   = "trello"
	Git      = "git"
)

Variables

This section is empty.

Functions

func GetIssueProvider

func GetIssueProvider(tracker IssueProvider) string

GetIssueProvider returns the kind of issue provider

Types

type GitIssueProvider

type GitIssueProvider struct {
	GitProvider *scm.Client
	Owner       string
	Repository  string
	// contains filtered or unexported fields
}

func (*GitIssueProvider) CreateIssue

func (i *GitIssueProvider) CreateIssue(_ *scm.Issue) (*scm.Issue, error)

func (*GitIssueProvider) CreateIssueComment

func (i *GitIssueProvider) CreateIssueComment(key, comment string) error

func (*GitIssueProvider) GetIssue

func (i *GitIssueProvider) GetIssue(key string) (*scm.Issue, error)

func (*GitIssueProvider) HomeURL

func (i *GitIssueProvider) HomeURL() string

func (*GitIssueProvider) IssueURL

func (i *GitIssueProvider) IssueURL(key string) string

func (*GitIssueProvider) SearchIssues

func (i *GitIssueProvider) SearchIssues(query string) ([]*scm.Issue, error)

func (*GitIssueProvider) SearchIssuesClosedSince

func (i *GitIssueProvider) SearchIssuesClosedSince(_ time.Time) ([]*scm.Issue, error)

type IssueProvider

type IssueProvider interface {
	// GetIssue returns the issue of the given key
	GetIssue(key string) (*scm.Issue, error)

	// SearchIssues searches for issues (open by default)
	SearchIssues(query string) ([]*scm.Issue, error)

	// SearchIssuesClosedSince searches the issues closed since the given da
	SearchIssuesClosedSince(t time.Time) ([]*scm.Issue, error)

	// Creates a new issue in the current project
	CreateIssue(issue *scm.Issue) (*scm.Issue, error)

	// Creates a comment on the given issue
	CreateIssueComment(key string, comment string) error

	// IssueURL returns the URL of the given issue for this project
	IssueURL(key string) string

	// HomeURL returns the home URL of the issue tracker
	HomeURL() string
}

func CreateGitIssueProvider

func CreateGitIssueProvider(scmClient *scm.Client, owner, repository string) (IssueProvider, error)

func CreateJiraIssueProvider

func CreateJiraIssueProvider(serverURL, username, apiToken, project string, batchMode bool) (IssueProvider, error)

type JiraService

type JiraService struct {
	JiraClient *jira.Client
	ServerURL  string
	Project    string
}

func (*JiraService) CreateIssue

func (i *JiraService) CreateIssue(issue *scm.Issue) (*scm.Issue, error)

func (*JiraService) CreateIssueComment

func (i *JiraService) CreateIssueComment(_, _ string) error

func (*JiraService) GetIssue

func (i *JiraService) GetIssue(key string) (*scm.Issue, error)

func (*JiraService) HomeURL

func (i *JiraService) HomeURL() string

func (*JiraService) IssueURL

func (i *JiraService) IssueURL(key string) string

func (*JiraService) SearchIssues

func (i *JiraService) SearchIssues(query string) ([]*scm.Issue, error)

func (*JiraService) SearchIssuesClosedSince

func (i *JiraService) SearchIssuesClosedSince(_ time.Time) ([]*scm.Issue, error)

func (*JiraService) ServerName

func (i *JiraService) ServerName() string

Jump to

Keyboard shortcuts

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