-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addressing the event title matching issue
When event_title.startsWith() is used for pull_request, the CEL expressions do not behave as anticipated due to the lack of handling for pull_request events. Signed-off-by: Savita Ashture <[email protected]>
- Loading branch information
1 parent
5c0708a
commit 3053676
Showing
5 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
test/testdata/pipelinerun-cel-annotation-for-title-match.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: "\\ .PipelineName //" | ||
annotations: | ||
pipelinesascode.tekton.dev/target-namespace: "\\ .TargetNamespace //" | ||
pipelinesascode.tekton.dev/on-cel-expression: | | ||
event == "\\ .TargetEvent //" && event_title.startsWith("Testing Github") | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: task | ||
taskSpec: | ||
steps: | ||
- name: task | ||
image: registry.access.redhat.com/ubi9/ubi-micro | ||
command: ["/bin/echo", "HELLOMOTO"] |