From 714af11137a4e32c7b48f28263243ed7c59067d3 Mon Sep 17 00:00:00 2001 From: Jing Qi Date: Tue, 29 Oct 2024 17:41:23 +0800 Subject: [PATCH] chore: don't run e2e-test for draft pr Signed-off-by: Jing Qi --- .tekton/release-service-pull-request.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.tekton/release-service-pull-request.yaml b/.tekton/release-service-pull-request.yaml index 8e99bb5d..a48a2139 100644 --- a/.tekton/release-service-pull-request.yaml +++ b/.tekton/release-service-pull-request.yaml @@ -7,7 +7,11 @@ metadata: build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" + pipelinesascode.tekton.dev/on-cel-expression: | + event == "pull_request" + && target_branch == "main" + && ( !has(body.pull_request) || !body.pull_request.draft) + && files.all.exists(x, !x.matches('^(?:.github)/|\\.md$|^(?:.*/)?(?:\\.gitignore|PROJECT|LICENSE|.sonarcloud.properties|.gitlint|.dockerignore)$')) creationTimestamp: null labels: appstudio.openshift.io/application: release-service