Documentation ¶
Index ¶
- func Browse(client Client, branchName string) (string, error)
- func Comment(client Client, branchName, comment string) error
- func Create(client Client) (string, error)
- func GetIssueID(branchName string) string
- func GetPivotalIssueID(branchName string) string
- func Load() (map[string]string, error)
- func Login(client Client) (bool, error)
- func PrepareCommitMessage(client Client, branchName, commitMessage string) string
- func Save(values map[string]string) error
- func SlugifyTitle(ticketTitle string) string
- func Start(client Client, issueType, issueID string) (string, error)
- type Client
- type JiraClient
- func (j *JiraClient) Authenticate(fields map[string]string) bool
- func (j *JiraClient) Browse(branchName string) (string, error)
- func (j *JiraClient) Comment(branchName, comment string) error
- func (j *JiraClient) Create() (string, error)
- func (j *JiraClient) FormatField(fieldName string, value string) string
- func (j *JiraClient) GetAuthFields() map[string]bool
- func (j *JiraClient) GetBranchName(issueType string, issueID string) (string, error)
- func (j *JiraClient) GetDomain() (string, error)
- func (j *JiraClient) GetName() string
- func (j *JiraClient) PrepareCommitMessage(branchName, commitMessage string) string
- func (j *JiraClient) Start(issueType string, issueID string) (string, error)
- type PivotalClient
- func (p *PivotalClient) Authenticate(fields map[string]string) bool
- func (p *PivotalClient) Browse(branchName string) (string, error)
- func (p *PivotalClient) Comment(branchName, comment string) error
- func (p *PivotalClient) Create() (string, error)
- func (p *PivotalClient) FormatField(fieldName string, value string) string
- func (p *PivotalClient) GetAuthFields() map[string]bool
- func (p *PivotalClient) GetBranchName(issueType string, issueID string) (string, error)
- func (p *PivotalClient) GetName() string
- func (p *PivotalClient) GetProjectIdAndIssueId(issueID string) (int, int, error)
- func (p *PivotalClient) PrepareCommitMessage(branchName, commitMessage string) string
- func (p *PivotalClient) Start(issueType string, issueID string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIssueID ¶ added in v1.7.0
GetIssueID : returns the issue id from a branch name
func GetPivotalIssueID ¶ added in v1.7.0
func PrepareCommitMessage ¶ added in v1.7.0
PrepareCommitMessage : Prepares the commit message and returns a new commit message
func SlugifyTitle ¶
SlugifyTitle : Make sure to clean up the branch names
Types ¶
type Client ¶ added in v1.2.0
type Client interface { GetAuthFields() map[string]bool GetName() string FormatField(fieldName string, value string) string Authenticate(fields map[string]string) bool Start(issueType string, issueID string) (branchName string, err error) Browse(branchName string) (string, error) Comment(branchName, comment string) error PrepareCommitMessage(branchName, commitMessage string) string Create() (string, error) }
Client : Public interface for the generic client
func NewAuthenticatedClient ¶ added in v1.2.0
NewAuthenticatedClient : Return a new client authenticated
type JiraClient ¶ added in v1.2.0
type JiraClient struct {
// contains filtered or unexported fields
}
JiraClient : Struct implementing the generic Client interface
func NewJiraClient ¶ added in v1.2.0
func NewJiraClient() *JiraClient
NewJiraClient : Returns a pointer to JiraClient
func (*JiraClient) Authenticate ¶ added in v1.2.0
func (j *JiraClient) Authenticate(fields map[string]string) bool
Authenticate : Authenticates using the fields passed in
func (*JiraClient) Browse ¶ added in v1.2.0
func (j *JiraClient) Browse(branchName string) (string, error)
Browse : Browse to the URL of the issue related to the branch name
func (*JiraClient) Comment ¶ added in v1.2.0
func (j *JiraClient) Comment(branchName, comment string) error
Comment : Post a comment on a jira issue
func (*JiraClient) Create ¶ added in v1.7.0
func (j *JiraClient) Create() (string, error)
Create will create a new client
func (*JiraClient) FormatField ¶ added in v1.2.0
func (j *JiraClient) FormatField(fieldName string, value string) string
FormatField : Returns a formatted field based on internal rules
func (*JiraClient) GetAuthFields ¶ added in v1.2.0
func (j *JiraClient) GetAuthFields() map[string]bool
GetAuthFields : Get a map of auth fields
func (*JiraClient) GetBranchName ¶ added in v1.2.0
func (j *JiraClient) GetBranchName(issueType string, issueID string) (string, error)
GetBranchName : Return the branch name from the issue id and issue type
func (*JiraClient) GetDomain ¶ added in v1.7.0
func (j *JiraClient) GetDomain() (string, error)
GetDomain : Get the domain from the config
func (*JiraClient) GetName ¶ added in v1.2.0
func (j *JiraClient) GetName() string
GetName : Return the string name of the struct eg: jira
func (*JiraClient) PrepareCommitMessage ¶ added in v1.7.0
func (j *JiraClient) PrepareCommitMessage(branchName, commitMessage string) string
PrepareCommitMessage : Returns a string with the issue id in the link
type PivotalClient ¶ added in v1.7.0
type PivotalClient struct {
// contains filtered or unexported fields
}
PivotalClient : Struct implementing the generic Client interface
func NewPivotalClient ¶ added in v1.7.0
func NewPivotalClient() *PivotalClient
NewPivotalClient : Returns a pointer to PivotalClient
func (*PivotalClient) Authenticate ¶ added in v1.7.0
func (p *PivotalClient) Authenticate(fields map[string]string) bool
Authenticate : Authenticates using the fields passed in
func (*PivotalClient) Browse ¶ added in v1.7.0
func (p *PivotalClient) Browse(branchName string) (string, error)
Browse : Browse to the URL of the issue related to the branch name
func (*PivotalClient) Comment ¶ added in v1.7.0
func (p *PivotalClient) Comment(branchName, comment string) error
func (*PivotalClient) Create ¶ added in v1.7.0
func (p *PivotalClient) Create() (string, error)
func (*PivotalClient) FormatField ¶ added in v1.7.0
func (p *PivotalClient) FormatField(fieldName string, value string) string
FormatField : Returns a formatted field based on internal rules
func (*PivotalClient) GetAuthFields ¶ added in v1.7.0
func (p *PivotalClient) GetAuthFields() map[string]bool
func (*PivotalClient) GetBranchName ¶ added in v1.7.0
func (p *PivotalClient) GetBranchName(issueType string, issueID string) (string, error)
func (*PivotalClient) GetName ¶ added in v1.7.0
func (p *PivotalClient) GetName() string
GetName : Return the string name of the struct eg: pivotal
func (*PivotalClient) GetProjectIdAndIssueId ¶ added in v1.7.0
func (p *PivotalClient) GetProjectIdAndIssueId(issueID string) (int, int, error)
func (*PivotalClient) PrepareCommitMessage ¶ added in v1.7.0
func (p *PivotalClient) PrepareCommitMessage(branchName, commitMessage string) string