Skip to content

Commit 9647d0c

Browse files
authored
replace allow with enabled (#478)
1 parent afcc6a1 commit 9647d0c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/digger/digger.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,14 @@ func runDriftDetection(policyChecker policy.Checker, SCMOrganisation string, SCM
408408
if err != nil {
409409
log.Printf("Failed to send usage report. %v", err)
410410
}
411-
policyAllowed, err := policyChecker.CheckDriftPolicy(SCMOrganisation, SCMrepository, projectName)
411+
policyEnabled, err := policyChecker.CheckDriftPolicy(SCMOrganisation, SCMrepository, projectName)
412412
if err != nil {
413413
log.Printf("failed to check drift policy. %v", err)
414414
return err
415415
}
416416

417-
if !policyAllowed {
418-
log.Printf("skipping this drift application since drift policy does not allow it")
417+
if !policyEnabled {
418+
log.Printf("skipping this drift application since it is not enabled for this project")
419419
return nil
420420
}
421421
planPerformed, nonEmptyPlan, plan, _, err := diggerExecutor.Plan()

pkg/policy/policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ func (p DiggerPolicyChecker) CheckDriftPolicy(SCMOrganisation string, SCMreposit
396396
ctx := context.Background()
397397
fmt.Printf("DEBUG: passing the following input policy: %v ||| text: %v", input, policy)
398398
query, err := rego.New(
399-
rego.Query("data.digger.allow"),
399+
rego.Query("data.digger.enable"),
400400
rego.Module("digger", policy),
401401
).PrepareForEval(ctx)
402402

0 commit comments

Comments
 (0)