Documentation
¶
Index ¶
- func CreateSCMProvider(repoInfo *SharedRepoInfo) (services.SCMProvider, error)
- func ExtractIssueInfo(branchName string) (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 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 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: the override, else the per-repo label, else the global label, else "".
func GetReadyStatus ¶ added in v0.4.1
GetReadyStatus returns the appropriate ready status for the repository. An empty result means no status is configured and the update is skipped.
func GetUnreadyLabel ¶ added in v0.4.1
GetUnreadyLabel returns the appropriate unready label for the repository. An empty result means only the ready label is removed.
func GetUnreadyStatus ¶ added in v0.4.1
GetUnreadyStatus returns the appropriate unready status for the repository. An empty result means no status is configured and the update is skipped.
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 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