-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
False
-
-
False
-
-
Description of problem:
When a pipelinerun is defined with an on-cel annotation like body.pull_request.labels.exists(l, l == "run-the-test"), the pipelinerun does not run when a maintainer labels the PR with the "run-the-test" label. The on-cel expression is not currently evaluated at all when labels are updated unless the `on-label` annotation is present.
Workaround
Adding an on-label annotation to the pipelinerun allows the on-cel expression to be evaluated whenever a label is added. However the on-label annotation has no additional effect since the on-cel annotation means all other "on-*" annotations are ignored.
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- Author a pipelinerun with an annotation like so: {{on-cel: event == "pull_request" && has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == "run-the-test")
- Open a pull request with this pipelinerun
- Label the pull request with the "run-the-test" label
Actual results:
No pipelinerun is run
Expected results:
The pipelinerun starts
Reproducibility (Always/Intermittent/Only Once): alwaus
Acceptance criteria:
- When an on-cel expression references a pull request's labels, changes to the PR labels can start the PLR if the on-cel expression matches
- (nice to have) in the above event, the PLR is only evaluated if the new label changes the evaluation of the on-cel expression result
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):