palantir/policy-bot

requires.conditions not working correctly in rule

Closed this issue · 2 comments

Have a rule that looks like this

- name: rulename
  if:
    changed_files:
      paths:
        - path1
        - path2
  requires:
    conditions:
      has_successful_status:
        - "status check"

I'm getting this error when attempting to validate the policy.

{"message":"Policy is invalid. 'yaml: unmarshal errors:\n  line 77: field conditions not found in type common.Requires'.","version":"1.34.1"}

I'm guessing this isn't expected since requires.conditions is an example config in the README.

The requires.conditions feature was introduced in 1.35.0, but from the log, it looks like you instance of Policy Bot is still running 1.34.1. Please try upgrading to the latest version and see if that fixes things.

Updating to 1.35.0 fixed this. Thanks!