From 035c1dc611496f0e47a9a642451cb46cf33cf728 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 04:19:47 +0000 Subject: [PATCH] test: make single-role assertion specific in role checks Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d897b0b8-59e8-415e-865b-e0bdeaf80f69 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/role_checks_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/workflow/role_checks_test.go b/pkg/workflow/role_checks_test.go index 1c5275f6588..c0be7e071d1 100644 --- a/pkg/workflow/role_checks_test.go +++ b/pkg/workflow/role_checks_test.go @@ -182,7 +182,8 @@ Test that on.roles supports a single string permission value.` compiledStr := string(compiledContent) assert.Contains(t, compiledStr, "id: check_membership", "Compiled workflow should include membership checks for role-gated triggers") - assert.Contains(t, compiledStr, "write", "Compiled workflow should require the single role provided as a string") + assert.Contains(t, compiledStr, `GH_AW_REQUIRED_ROLES: "write"`, "Compiled workflow should require the single role provided as a string") + assert.NotContains(t, compiledStr, `GH_AW_REQUIRED_ROLES: "admin,maintainer,write"`, "Compiled workflow should not fall back to default role list when a single role string is provided") } func TestInferEventsFromTriggers(t *testing.T) {