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

Function GetCommentEventByIdentifier

pkg/workflow/comment.go:53–63  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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")
53func 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)

Callers 4

FilterCommentEventsFunction · 0.85

Calls 1

GetAllCommentEventsFunction · 0.85

Tested by 3