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

Function TestStatusCommentDecoupling

pkg/workflow/notify_comment_test.go:801–916  ·  view source on GitHub ↗

TestStatusCommentDecoupling tests the decoupling of status-comment from ai-reaction

(t *testing.T)

Source from the content-addressed store, hash-verified

799
800// TestStatusCommentDecoupling tests the decoupling of status-comment from ai-reaction
801func TestStatusCommentDecoupling(t *testing.T) {
802 tests := []struct {
803 name string
804 aiReaction string
805 statusComment *bool
806 expectActivationComment bool
807 expectConclusionUpdate bool
808 expectActivationReaction bool
809 safeOutputJobNames []string
810 }{
811 {
812 name: "ai-reaction without status-comment",
813 aiReaction: "eyes",
814 statusComment: nil,
815 expectActivationComment: false,
816 expectConclusionUpdate: false,
817 expectActivationReaction: true,
818 safeOutputJobNames: []string{"missing_tool"},
819 },
820 {
821 name: "both ai-reaction and status-comment enabled",
822 aiReaction: "eyes",
823 statusComment: boolPtr(true),
824 expectActivationComment: true,
825 expectConclusionUpdate: true,
826 expectActivationReaction: true,
827 safeOutputJobNames: []string{"missing_tool"},
828 },
829 {
830 name: "ai-reaction with explicit status-comment: false",
831 aiReaction: "eyes",
832 statusComment: boolPtr(false),
833 expectActivationComment: false,
834 expectConclusionUpdate: false,
835 expectActivationReaction: true,
836 safeOutputJobNames: []string{"missing_tool"},
837 },
838 {
839 name: "neither ai-reaction nor status-comment",
840 aiReaction: "",
841 statusComment: nil,
842 expectActivationComment: false,
843 expectConclusionUpdate: false,
844 expectActivationReaction: false,
845 safeOutputJobNames: []string{"missing_tool"},
846 },
847 {
848 name: "status-comment without ai-reaction",
849 aiReaction: "",
850 statusComment: boolPtr(true),
851 expectActivationComment: true,
852 expectConclusionUpdate: true,
853 expectActivationReaction: false,
854 safeOutputJobNames: []string{"missing_tool"},
855 },
856 {
857 name: "status-comment with ai-reaction: none",
858 aiReaction: "none",

Callers

nothing calls this directly

Calls 6

buildActivationJobMethod · 0.95
buildConclusionJobMethod · 0.95
NewCompilerFunction · 0.85
boolPtrFunction · 0.70
RunMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected