You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Default success conclusion is missing from predicate failure descriptions #1397
When has_status or has_workflow_result is configured without an explicit conclusions list, the predicate correctly defaults to success for evaluation, but the failure description still formats the original (empty) field.
If ci/test concludes with failure, the policy is rejected as expected, but the predicate description is:
One or more statuses has not concluded with : ci/test
The same happens for has_workflow_result:
One or more workflow runs have not concluded with : .github/workflows/ci.yml
In both cases, the condition phrase already says success, so the empty value in the failure message is inconsistent and makes the diagnostic less useful. A user looking at the policy result cannot tell from the failure detail that the implicit requirement was success.
The cause appears to be that Evaluate normalizes the empty configuration into a local success slice for the check itself, but the failure branch still calls pred.Conclusions.joinWithOr() instead of using that normalized value. The fix should be small: use the normalized conclusions when building the failure description, and add regression coverage for the default case in both predicates.
Activity