Documentation
¶
Index ¶
- func Contains(s, substring string) bool
- func CreateSCMProvider(repoInfo *SharedRepoInfo) (services.SCMProvider, error)
- func ExtractIssueInfo(branchName string) (string, int, error)
- func ExtractIssueNumber(branchName string) (int, error)
- func GenerateMilestone(t time.Time) string
- func GetReadyLabel(cfg *config.Settings, repo *config.Repository, overrideLabel string) string
- func GetReadyStatus(cfg *config.Settings, repo *config.Repository, overrideStatus string) string
- func GetUnreadyLabel(cfg *config.Settings, repo *config.Repository, overrideLabel string) string
- func GetUnreadyStatus(cfg *config.Settings, repo *config.Repository, overrideStatus string) string
- func HandleLabelAndStatusOperation(operation LabelOperation, overrideLabel string, overrideStatus string) error
- func HandleLabelAndStatusOperationWithUnready(operation LabelOperation, overrideLabel string, overrideStatus string, ...) error
- func HandleLabelOperation(operation LabelOperation, overrideLabel string) error
- func OpenURL(url string) error
- func SplitOnCommaAndWhitespace(s string) []string
- func TruncateAndDashCase(s string, maxLen int) string
- type LabelOperation
- type SharedRepoInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSCMProvider ¶ added in v0.4.0
func CreateSCMProvider(repoInfo *SharedRepoInfo) (services.SCMProvider, error)
CreateSCMProvider creates the appropriate SCM provider for the repository
func ExtractIssueInfo ¶ added in v0.6.1
ExtractIssueInfo extracts the project name (optional) and issue number from a branch name. Branch names can be in the format:
- 123-branch-name (same repo)
- project-123-branch-name (cross-repo)
Returns: (projectName, issueNumber, error) If projectName is empty, the issue is in the same repo as the branch.
func ExtractIssueNumber ¶
ExtractIssueNumber extracts the issue number from a branch name. Branch names are typically in the format 123-branch-name or project-123-branch-name. This function is kept for backward compatibility and uses ExtractIssueInfo internally.
func GenerateMilestone ¶
GenerateMilestone creates a milestone string in the format YYYY.QN based on the provided time For example: 2025.Q1 for January-March, 2025.Q2 for April-June, etc.
func GetReadyLabel ¶ added in v0.4.0
GetReadyLabel returns the appropriate ready label for the repository
func GetReadyStatus ¶ added in v0.4.1
GetReadyStatus returns the appropriate ready status for the repository
func GetUnreadyLabel ¶ added in v0.4.1
GetUnreadyLabel returns the appropriate unready label for the repository
func GetUnreadyStatus ¶ added in v0.4.1
GetUnreadyStatus returns the appropriate unready status for the repository
func HandleLabelAndStatusOperation ¶ added in v0.4.1
func HandleLabelAndStatusOperation(operation LabelOperation, overrideLabel string, overrideStatus string) error
HandleLabelAndStatusOperation handles adding or removing labels from an issue and updating status
func HandleLabelAndStatusOperationWithUnready ¶ added in v0.4.1
func HandleLabelAndStatusOperationWithUnready(operation LabelOperation, overrideLabel string, overrideStatus string, overrideUnreadyLabel string) error
HandleLabelAndStatusOperationWithUnready handles adding or removing labels from an issue and updating status, with unready label support
func HandleLabelOperation ¶ added in v0.4.0
func HandleLabelOperation(operation LabelOperation, overrideLabel string) error
HandleLabelOperation handles adding or removing labels from an issue and updating status
func SplitOnCommaAndWhitespace ¶
SplitOnCommaAndWhitespace splits a string on commas and trims whitespace
func TruncateAndDashCase ¶
TruncateAndDashCase converts a string to dash-case and truncates it to the specified length Keeps consecutive uppercase letters together (e.g., "IRSA" stays as "irsa", not "i-r-s-a")
Types ¶
type LabelOperation ¶ added in v0.4.0
type LabelOperation int
LabelOperation represents the type of label operation
const ( AddLabel LabelOperation = iota RemoveLabel )
type SharedRepoInfo ¶ added in v0.4.0
type SharedRepoInfo struct {
}
SharedRepoInfo holds information about a selected repository and related data
func SelectSharedRepository ¶ added in v0.4.0
func SelectSharedRepository() (*SharedRepoInfo, error)
SelectSharedRepository determines which repository to work with using shared logic