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

Function TestPullRequestCommentEvent

pkg/workflow/command_test.go:17–29  ·  view source on GitHub ↗

TestPullRequestCommentEvent tests the new pull_request_comment event identifier

(t *testing.T)

Source from the content-addressed store, hash-verified

15
16// TestPullRequestCommentEvent tests the new pull_request_comment event identifier
17func TestPullRequestCommentEvent(t *testing.T) {
18 // Test that pull_request_comment is recognized
19 mapping := GetCommentEventByIdentifier("pull_request_comment")
20 if mapping == nil {
21 t.Fatal("pull_request_comment should be a valid event identifier")
22 }
23 if mapping.EventName != "pull_request_comment" {
24 t.Errorf("Expected EventName to be 'pull_request_comment', got '%s'", mapping.EventName)
25 }
26 if !mapping.IsPRComment {
27 t.Error("Expected IsPRComment to be true for pull_request_comment")
28 }
29}
30
31// TestIssueCommentRestriction tests that issue_comment is restricted to issues only
32func TestIssueCommentRestriction(t *testing.T) {

Callers

nothing calls this directly

Calls 3

ErrorfMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected