Documentation
¶
Index ¶
Constants ¶
View Source
const ( // GitLab provider's name GITLAB_PROVIDER = "Gitlab" // GitLab cloud host GITLAB_CLOUD_HOST = "gitlab.com" // GitLab default protocol GITLAB_DEFAULT_PROTOCOL = "https" )
View Source
const (
// Jira provider's name
JIRA_PROVIDER = "Jira"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitLabProvider ¶
type GitLabProvider struct {
// contains filtered or unexported fields
}
func NewGitLabProvider ¶
func NewGitLabProvider(r *git.Repository) (*GitLabProvider, error)
func (GitLabProvider) Search ¶
func (glp GitLabProvider) Search() ([]IssueDescription, error)
Search return a list of issues of a GitLab project
type IssueDescription ¶
type IssueDescription struct {
// Issue id
ID string
// Issue Name
Name string
// Issue description
Description string
// Issue provider
Provider string
// Issue type
Type string
}
func SelectIssue ¶
func SelectIssue(ids []IssueDescription, color bool) (IssueDescription, error)
SelectIssue prompts a fuzzy finder and returns the selected IssueDescription or an error if something unexpected happened
func (IssueDescription) Format ¶
func (id IssueDescription) Format(color bool) string
Format format an issue description into a colored or raw string.
func (IssueDescription) ShortFormat ¶
func (id IssueDescription) ShortFormat() string
ShortFormat returns the shor representation string of an IssueDescription
type JiraProvider ¶
type JiraProvider struct {
// contains filtered or unexported fields
}
JiraProvider represents the Jira issue provider.
func (JiraProvider) Search ¶
func (jp JiraProvider) Search() ([]IssueDescription, error)
Search returns a list of issues matching the query or an error if the request failed.
type Provider ¶
type Provider interface {
// Search a list of issue in the provider
Search() ([]IssueDescription, error)
}
Provider interface abstracts cross-platform providers
func ProvidersFrom ¶
func ProvidersFrom(r *git.Repository) ([]Provider, error)
Click to show internal directories.
Click to hide internal directories.