From 83dc5227f6a16b4d5fe2af0aa803f38013e0dee9 Mon Sep 17 00:00:00 2001 From: Mohamed Habib Date: Thu, 21 Nov 2024 12:06:48 +0000 Subject: [PATCH] ee plan policy in mgmt repo (#1835) * add plan policy fetcher * plan.rego --- ee/cli/pkg/policy/policy.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ee/cli/pkg/policy/policy.go b/ee/cli/pkg/policy/policy.go index 75c51aefe..720dbbd8b 100644 --- a/ee/cli/pkg/policy/policy.go +++ b/ee/cli/pkg/policy/policy.go @@ -108,7 +108,11 @@ func (p DiggerRepoPolicyProvider) GetAccessPolicy(organisation string, repo stri } func (p DiggerRepoPolicyProvider) GetPlanPolicy(organisation string, repository string, projectname string, projectDir string) (string, error) { - return "", nil + policy, err := p.getPolicyFileContents(repository, projectname, projectDir, "plan.rego") + if err != nil { + return policy, err + } + return policy, nil } func (p DiggerRepoPolicyProvider) GetDriftPolicy() (string, error) {