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