GetCommentEventByIdentifier returns the event mapping for a given identifier Uses GitHub Actions event names (e.g., "issues", "issue_comment", "pull_request_comment", "pull_request", "pull_request_review_comment")
(identifier string)
| 51 | // GetCommentEventByIdentifier returns the event mapping for a given identifier |
| 52 | // Uses GitHub Actions event names (e.g., "issues", "issue_comment", "pull_request_comment", "pull_request", "pull_request_review_comment") |
| 53 | func GetCommentEventByIdentifier(identifier string) *CommentEventMapping { |
| 54 | // Find and return the matching event mapping using GitHub Actions event names |
| 55 | allEvents := GetAllCommentEvents() |
| 56 | for i := range allEvents { |
| 57 | if allEvents[i].EventName == identifier { |
| 58 | return &allEvents[i] |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | return nil |
| 63 | } |
| 64 | |
| 65 | // ParseCommandEvents parses the events field from command configuration |
| 66 | // Returns a list of event identifiers to enable, or nil for default (all events) |