GetAllCommentEvents returns all possible comment-related events for command triggers
()
| 14 | |
| 15 | // GetAllCommentEvents returns all possible comment-related events for command triggers |
| 16 | func GetAllCommentEvents() []CommentEventMapping { |
| 17 | return []CommentEventMapping{ |
| 18 | { |
| 19 | EventName: "issues", |
| 20 | Types: []string{"opened", "edited", "reopened"}, |
| 21 | }, |
| 22 | { |
| 23 | EventName: "issue_comment", |
| 24 | Types: []string{"created", "edited"}, |
| 25 | IsIssueComment: true, // Only comments on issues (not PRs) |
| 26 | }, |
| 27 | { |
| 28 | EventName: "pull_request_comment", |
| 29 | Types: []string{"created", "edited"}, |
| 30 | IsPRComment: true, // Only comments on PRs (uses issue_comment event with filter) |
| 31 | }, |
| 32 | { |
| 33 | EventName: "pull_request", |
| 34 | Types: []string{"opened", "edited", "reopened"}, |
| 35 | }, |
| 36 | { |
| 37 | EventName: "pull_request_review_comment", |
| 38 | Types: []string{"created", "edited"}, |
| 39 | }, |
| 40 | { |
| 41 | EventName: "discussion", |
| 42 | Types: []string{"created", "edited"}, |
| 43 | }, |
| 44 | { |
| 45 | EventName: "discussion_comment", |
| 46 | Types: []string{"created", "edited"}, |
| 47 | }, |
| 48 | } |
| 49 | } |
| 50 | |
| 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") |
no outgoing calls