Skip to content

Commit 6484b59

Browse files
zakiskpipelines-as-code[bot]
authored andcommitted
chore: update docs about CEL expression precedence
updated docs clarifying the predence of CEL expression over other matching annotations. Signed-off-by: Zaki Shaikh <[email protected]>
1 parent 9e37185 commit 6484b59

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/content/docs/guide/matchingevents.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,10 @@ metadata:
282282
If you need to do some advanced matching, `Pipelines-as-Code` supports CEL
283283
expressions to do advanced filtering on the specific event you need to be matched.
284284

285-
If you have the `pipelinesascode.tekton.dev/on-cel-expression` annotation in
286-
your PipelineRun, the CEL expression will be used and the `on-target-branch` or
287-
`on-event` annotations will be skipped.
285+
{{< hint danger >}}
286+
If you use the `on-cel-expression` annotation in the same pipeline run as an `on-event`, `on-target-branch`, `on-label`, `on-path-change`, or `on-path-change-ignore`
287+
annotation, the `on-cel-expression` annotation takes priority and Pipelines-as-Code ignores the other annotations.
288+
{{< /hint >}}
288289

289290
This example will match a `pull_request` event targeting the branch `main`
290291
coming from a branch called `wip`:

0 commit comments

Comments
 (0)