parseCommentTrigger parses comment triggers
(input string)
| 461 | |
| 462 | // parseCommentTrigger parses comment triggers |
| 463 | func 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 |
| 484 | func parseReleaseRepositoryTrigger(input string) (*TriggerIR, error) { |
no outgoing calls
no test coverage detected