Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidSignature = errors.New("invalid webhook signature")
Functions ¶
Types ¶
type KeywordAction ¶
type KeywordAction struct {
Status tasks.Status // target status
Verb string // past-tense label for comment, e.g. "Resolved"
}
KeywordAction maps a commit message keyword to a task status transition.
type ParsedReference ¶
type ParsedReference struct {
TaskNumber int
Action *KeywordAction // nil if bare #N with no keyword
CommitHash string
CommitMessage string
}
ParsedReference represents a single task reference found in a commit message.
func ParseCommitMessage ¶
func ParseCommitMessage(message string) []ParsedReference
ParseCommitMessage scans a commit message for task references. Returns a list of ParsedReference, one per unique #NUMBER found. If both a keyword and bare reference exist for the same number, the keyword wins.
type ProcessResult ¶
type ProcessResult struct {
Matched int `json:"matched"`
Resolved int `json:"resolved"`
Mentioned int `json:"mentioned"`
}
ProcessResult tracks the results of processing a push event.
func NewProcessResult ¶
func NewProcessResult() *ProcessResult
func (*ProcessResult) AddMatched ¶
func (r *ProcessResult) AddMatched()
func (*ProcessResult) AddMentioned ¶
func (r *ProcessResult) AddMentioned()
func (*ProcessResult) AddResolved ¶
func (r *ProcessResult) AddResolved()
type PushCommit ¶
PushCommit is a flattened commit used by the service layer.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) ProcessPushEvent ¶
func (s *Service) ProcessPushEvent( ctx context.Context, repoFullName string, commits []PushCommit, ) (*ProcessResult, error)
Click to show internal directories.
Click to hide internal directories.