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

Function GetAllCommentEvents

pkg/workflow/comment.go:16–49  ·  view source on GitHub ↗

GetAllCommentEvents returns all possible comment-related events for command triggers

()

Source from the content-addressed store, hash-verified

14
15// GetAllCommentEvents returns all possible comment-related events for command triggers
16func 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")

Callers 4

FilterCommentEventsFunction · 0.85
TestGetAllCommentEventsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGetAllCommentEventsFunction · 0.68