Skip to content

Commit

Permalink
.tekton/pull-request: re-format CEL expression
Browse files Browse the repository at this point in the history
Also add comments.

Signed-off-by: Adam Cmiel <[email protected]>
  • Loading branch information
chmeliik committed Jul 25, 2024
1 parent 5004c6a commit 5073820
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .tekton/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ kind: PipelineRun
metadata:
name: build-definitions-pull-request
annotations:
pipelinesascode.tekton.dev/on-cel-expression: (event == "pull_request" && target_branch == "main" && ( !has(body.pull_request) || !body.pull_request.draft) ) || (event == "push" && target_branch.startsWith("gh-readonly-queue/main/"))
pipelinesascode.tekton.dev/on-cel-expression: |
(
// PR to "main" branch, not draft
event == "pull_request" && target_branch == "main"
&& (!has(body.pull_request) || !body.pull_request.draft)
) || (
// PR enters the merge queue
event == "push" && target_branch.startsWith("gh-readonly-queue/main/")
)
pipelinesascode.tekton.dev/task: "[task/git-clone/0.1/git-clone.yaml, .tekton/tasks/buildah.yaml, .tekton/tasks/yaml-lint.yaml, .tekton/tasks/e2e-test.yaml, task/sast-snyk-check/0.1/sast-snyk-check.yaml]"
pipelinesascode.tekton.dev/task-2: "yaml-lint"
pipelinesascode.tekton.dev/max-keep-runs: "5"
Expand Down

0 comments on commit 5073820

Please sign in to comment.