-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Description
Currently the has_labels
predicate requires all labels to be present on the pull request.
There's some use-cases when you want to make sure it's an either/or, or one or more of the labels should be present on the pull_request, but not all of them.
Example rule I want to define:
- A pull request should have either
fizzbuzz:true
orfizzbuzz:false
label declared - The pull request must only have one of those labels declared.
Ideally it should be an approval rule like this:
policy:
approval:
- fizzbuzz-label-presence
approval_rules:
- name: fizzbuzz-label-presence
requires:
has_labels:
- or:
- "fizzbuzz:true"
- "fizzbuzz:false"
Either make the has_labels
predicate support boolean logic (like with the approvals), or provide a has_any_label
predicate that allows a looser predicate matching on labels.
Metadata
Metadata
Assignees
Labels
No labels