issues

package
v1.3.292 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	IssueTrackerKinds = []string{Bugzilla, Jira, Trello}
)

Functions

func GetIssueProvider added in v1.1.51

func GetIssueProvider(tracker IssueProvider) string

GetIssueProvider returns the kind of issue provider

func ProviderAccessTokenURL

func ProviderAccessTokenURL(kind string, url string) string

Types

type GitIssueProvider

type GitIssueProvider struct {
	GitProvider gits.GitProvider
	Owner       string
	Repository  string
}

func (*GitIssueProvider) CreateIssue

func (i *GitIssueProvider) CreateIssue(issue *gits.GitIssue) (*gits.GitIssue, error)

func (*GitIssueProvider) CreateIssueComment

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

func (*GitIssueProvider) GetIssue

func (i *GitIssueProvider) GetIssue(key string) (*gits.GitIssue, error)

func (*GitIssueProvider) HomeURL added in v1.1.51

func (i *GitIssueProvider) HomeURL() string

func (*GitIssueProvider) IssueURL added in v1.1.26

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

func (*GitIssueProvider) SearchIssues

func (i *GitIssueProvider) SearchIssues(query string) ([]*gits.GitIssue, error)

func (*GitIssueProvider) SearchIssuesClosedSince added in v1.1.67

func (i *GitIssueProvider) SearchIssuesClosedSince(t time.Time) ([]*gits.GitIssue, error)

type IssueProvider

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

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

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

	// Creates a new issue in the current project
	CreateIssue(issue *gits.GitIssue) (*gits.GitIssue, 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(gitProvider gits.GitProvider, owner string, repository string) (IssueProvider, error)

func CreateIssueProvider

func CreateIssueProvider(kind string, server *auth.AuthServer, userAuth *auth.UserAuth, project string, batchMode bool, git gits.Gitter) (IssueProvider, error)

func CreateJiraIssueProvider

func CreateJiraIssueProvider(server *auth.AuthServer, userAuth *auth.UserAuth, project string, batchMode bool, git gits.Gitter) (IssueProvider, error)

type JiraService

type JiraService struct {
	JiraClient *jira.Client
	Server     *auth.AuthServer
	UserAuth   *auth.UserAuth
	Project    string
	Git        gits.Gitter
}

func (*JiraService) CreateIssue

func (i *JiraService) CreateIssue(issue *gits.GitIssue) (*gits.GitIssue, error)

func (*JiraService) CreateIssueComment

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

func (*JiraService) GetIssue

func (i *JiraService) GetIssue(key string) (*gits.GitIssue, error)

func (*JiraService) HomeURL added in v1.1.51

func (i *JiraService) HomeURL() string

func (*JiraService) IssueURL added in v1.1.26

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

func (*JiraService) SearchIssues

func (i *JiraService) SearchIssues(query string) ([]*gits.GitIssue, error)

func (*JiraService) SearchIssuesClosedSince added in v1.1.67

func (i *JiraService) SearchIssuesClosedSince(t time.Time) ([]*gits.GitIssue, 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