jx: github.com/jenkins-x/jx/pkg/issues Index | Files

package issues

import "github.com/jenkins-x/jx/pkg/issues"

Index

Package Files

constants.go git_provider.go jira.go provider.go

Constants

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

Variables

var (
    IssueOpen   = "open"
    IssueClosed = "closed"
)
var (
    IssueTrackerKinds = []string{Bugzilla, Jira, Trello}
)

func GetIssueProvider Uses

func GetIssueProvider(tracker IssueProvider) string

GetIssueProvider returns the kind of issue provider

func ProviderAccessTokenURL Uses

func ProviderAccessTokenURL(kind string, url string) string

type GitIssueProvider Uses

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

func (*GitIssueProvider) CreateIssue Uses

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

func (*GitIssueProvider) CreateIssueComment Uses

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

func (*GitIssueProvider) GetIssue Uses

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

func (*GitIssueProvider) HomeURL Uses

func (i *GitIssueProvider) HomeURL() string

func (*GitIssueProvider) IssueURL Uses

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

func (*GitIssueProvider) SearchIssues Uses

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

func (*GitIssueProvider) SearchIssuesClosedSince Uses

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

type IssueProvider Uses

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 Uses

func CreateGitIssueProvider(gitProvider gits.GitProvider, owner string, repository string) (IssueProvider, error)

func CreateIssueProvider Uses

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

func CreateJiraIssueProvider Uses

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

type JiraService Uses

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

func (*JiraService) CreateIssue Uses

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

func (*JiraService) CreateIssueComment Uses

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

func (*JiraService) GetIssue Uses

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

func (*JiraService) HomeURL Uses

func (i *JiraService) HomeURL() string

func (*JiraService) IssueURL Uses

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

func (*JiraService) SearchIssues Uses

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

func (*JiraService) SearchIssuesClosedSince Uses

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

func (*JiraService) ServerName Uses

func (i *JiraService) ServerName() string

Package issues imports 11 packages (graph) and is imported by 4 packages. Updated 2019-09-01. Refresh now. Tools for package owners.