Documentation
¶
Index ¶
- func ConfigureMessage(msg entities.Message) (s string, err error)
- func Find[T any](content []*T, predicate func(*T) bool) *T
- func GetBranchNameFromRef(ref string) string
- func ParseTaskMentions(txt string) []*entities.TaskMention
- func RemoveDuplicates[T comparable](content []*T) []*T
- type MessageParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureMessage ¶
ConfigureMessage configures the message for the comment
If the message is a merge commit, returns an error, because merge commits are handled by the different webhook. Done to avoid duplicate comments on push and merge hooks.
func GetBranchNameFromRef ¶
GetBranchNameFromRef returns the branch name from the ref
Example: refs/heads/feature-123 -> feature-123
func ParseTaskMentions ¶
func ParseTaskMentions(txt string) []*entities.TaskMention
ParseTaskMentions parses all the task mentions in a text
func RemoveDuplicates ¶
func RemoveDuplicates[T comparable](content []*T) []*T
Types ¶
type MessageParser ¶ added in v0.1.0
type MessageParser struct {
// contains filtered or unexported fields
}
func NewMessageParser ¶ added in v0.1.0
func NewMessageParser(ff *config.FeatureFlags) *MessageParser
func (*MessageParser) GetTaskMentions ¶ added in v0.1.0
func (p *MessageParser) GetTaskMentions(msg entities.Message) (string, []*entities.TaskMention, error)
GetTaskMentions returns the configured message and all the tasks mentioned in the commit message and the branch name, if the commit mentions are enabled.
Click to show internal directories.
Click to hide internal directories.