MCPcopy Create free account
hub / github.com/github/gh-aw / parseCommentTrigger

Function parseCommentTrigger

pkg/workflow/trigger_parser.go:463–481  ·  view source on GitHub ↗

parseCommentTrigger parses comment triggers

(input string)

Source from the content-addressed store, hash-verified

461
462// parseCommentTrigger parses comment triggers
463func parseCommentTrigger(input string) (*TriggerIR, error) {
464 tokens := strings.Fields(input)
465 if len(tokens) < 2 {
466 return nil, nil
467 }
468
469 if tokens[0] == "comment" && tokens[1] == "created" {
470 // "comment created" - supports both issue and PR comments
471 return &TriggerIR{
472 Event: "issue_comment",
473 Types: []string{"created"},
474 AdditionalEvents: map[string]any{
475 "workflow_dispatch": nil,
476 },
477 }, nil
478 }
479
480 return nil, nil
481}
482
483// parseReleaseRepositoryTrigger parses release and repository lifecycle triggers
484func parseReleaseRepositoryTrigger(input string) (*TriggerIR, error) {

Callers 1

ParseTriggerShorthandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected