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

Function GetCommentEventNames

pkg/workflow/comment.go:122–128  ·  view source on GitHub ↗

GetCommentEventNames returns just the event names from a list of mappings

(mappings []CommentEventMapping)

Source from the content-addressed store, hash-verified

120
121// GetCommentEventNames returns just the event names from a list of mappings
122func GetCommentEventNames(mappings []CommentEventMapping) []string {
123 names := make([]string, len(mappings))
124 for i, mapping := range mappings {
125 names[i] = mapping.EventName
126 }
127 return names
128}
129
130// GetActualGitHubEventName returns the actual GitHub Actions event name for a given identifier
131// This maps pull_request_comment to issue_comment since that's the actual event in GitHub Actions

Calls

no outgoing calls

Tested by 2

TestFilterCommentEventsFunction · 0.68
TestGetCommentEventNamesFunction · 0.68