Repository: jenkins-x/lighthouse
Pull request #1141 (2020-11-02 08:53:38)

fix: add better default value
for values only supplied via PR pipelines to avoid missing parameter errors on release pipelines

jenkins-x-bot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by:
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **jstrachan**
You can assign the PR to them by writing `/assign @jstrachan` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=jenkins-x%2Flighthouse).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/jenkins-x/lighthouse/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["jstrachan"]} -->
abayer: /lgtm
jenkins-x-bot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *[abayer](https://github.com/jenkins-x/lighthouse/pull/1141#issuecomment-720484612 "LGTM")*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=jenkins-x%2Flighthouse).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com#issuecomment-720484612/jenkins-x/lighthouse/blob/master/OWNERS)~~ [abayer]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/pkg/triggerconfig/inrepo/default_parameters.go b/pkg/triggerconfig/inrepo/default_parameters.go
index 1356763b..5956397e 100644
--- a/pkg/triggerconfig/inrepo/default_parameters.go
+++ b/pkg/triggerconfig/inrepo/default_parameters.go
@@ -45,16 +45,28 @@ var (
 			Description: "git pull request number",
 			Name:        "PULL_NUMBER",
 			Type:        "string",
+			Default: &v1beta1.ArrayOrString{
+				Type:      v1beta1.ParamTypeString,
+				StringVal: "",
+			},
 		},
 		{
 			Description: "git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'",
 			Name:        "PULL_PULL_REF",
 			Type:        "string",
+			Default: &v1beta1.ArrayOrString{
+				Type:      v1beta1.ParamTypeString,
+				StringVal: "",
+			},
 		},
 		{
 			Description: "git revision to checkout (branch, tag, sha, ref…)",
 			Name:        "PULL_PULL_SHA",
 			Type:        "string",
+			Default: &v1beta1.ArrayOrString{
+				Type:      v1beta1.ParamTypeString,
+				StringVal: "",
+			},
 		},
 		{
 			Description: "git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'",


Test patch:
diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs-sub-dir/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs-sub-dir/expected.yaml
index c92898a9..092cc04c 100644
--- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs-sub-dir/expected.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs-sub-dir/expected.yaml
@@ -28,13 +28,16 @@ spec:
     - description: the git sha of the base of the pull request
       name: PULL_BASE_SHA
       type: string
-    - description: git pull request number
+    - default: ""
+      description: git pull request number
       name: PULL_NUMBER
       type: string
-    - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+    - default: ""
+      description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
       name: PULL_PULL_REF
       type: string
-    - description: git revision to checkout (branch, tag, sha, ref…)
+    - default: ""
+      description: git revision to checkout (branch, tag, sha, ref…)
       name: PULL_PULL_SHA
       type: string
     - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -129,13 +132,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -278,13 +284,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -418,13 +427,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -579,13 +591,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -735,13 +750,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -877,13 +895,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs/expected.yaml
index c92898a9..092cc04c 100644
--- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs/expected.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs/expected.yaml
@@ -28,13 +28,16 @@ spec:
     - description: the git sha of the base of the pull request
       name: PULL_BASE_SHA
       type: string
-    - description: git pull request number
+    - default: ""
+      description: git pull request number
       name: PULL_NUMBER
       type: string
-    - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+    - default: ""
+      description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
       name: PULL_PULL_REF
       type: string
-    - description: git revision to checkout (branch, tag, sha, ref…)
+    - default: ""
+      description: git revision to checkout (branch, tag, sha, ref…)
       name: PULL_PULL_SHA
       type: string
     - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -129,13 +132,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -278,13 +284,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -418,13 +427,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -579,13 +591,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -735,13 +750,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -877,13 +895,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline/expected.yaml
index 986e9aae..16fcf50f 100644
--- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline/expected.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline/expected.yaml
@@ -26,13 +26,16 @@ spec:
     - description: the git sha of the base of the pull request
       name: PULL_BASE_SHA
       type: string
-    - description: git pull request number
+    - default: ""
+      description: git pull request number
       name: PULL_NUMBER
       type: string
-    - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+    - default: ""
+      description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
       name: PULL_PULL_REF
       type: string
-    - description: git revision to checkout (branch, tag, sha, ref…)
+    - default: ""
+      description: git revision to checkout (branch, tag, sha, ref…)
       name: PULL_PULL_SHA
       type: string
     - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr-load-refs/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr-load-refs/expected.yaml
index d0e490cd..5cba6315 100644
--- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr-load-refs/expected.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr-load-refs/expected.yaml
@@ -37,13 +37,16 @@ spec:
     - description: the git sha of the base of the pull request
       name: PULL_BASE_SHA
       type: string
-    - description: git pull request number
+    - default: ""
+      description: git pull request number
       name: PULL_NUMBER
       type: string
-    - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+    - default: ""
+      description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
       name: PULL_PULL_REF
       type: string
-    - description: git revision to checkout (branch, tag, sha, ref…)
+    - default: ""
+      description: git revision to checkout (branch, tag, sha, ref…)
       name: PULL_PULL_SHA
       type: string
     - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -117,13 +120,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-append-steps/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-append-steps/expected.yaml
index 4283c96d..8ca32c92 100644
--- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-append-steps/expected.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-append-steps/expected.yaml
@@ -26,13 +26,16 @@ spec:
     - description: the git sha of the base of the pull request
       name: PULL_BASE_SHA
       type: string
-    - description: git pull request number
+    - default: ""
+      description: git pull request number
       name: PULL_NUMBER
       type: string
-    - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+    - default: ""
+      description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
       name: PULL_PULL_REF
       type: string
-    - description: git revision to checkout (branch, tag, sha, ref…)
+    - default: ""
+      description: git revision to checkout (branch, tag, sha, ref…)
       name: PULL_PULL_SHA
       type: string
     - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -96,13 +99,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-prepend-steps/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-prepend-steps/expected.yaml
index e70f20c6..da437256 100644
--- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-prepend-steps/expected.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-prepend-steps/expected.yaml
@@ -26,13 +26,16 @@ spec:
     - description: the git sha of the base of the pull request
       name: PULL_BASE_SHA
       type: string
-    - description: git pull request number
+    - default: ""
+      description: git pull request number
       name: PULL_NUMBER
       type: string
-    - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+    - default: ""
+      description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
       name: PULL_PULL_REF
       type: string
-    - description: git revision to checkout (branch, tag, sha, ref…)
+    - default: ""
+      description: git revision to checkout (branch, tag, sha, ref…)
       name: PULL_PULL_SHA
       type: string
     - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -96,13 +99,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-without-params/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-without-params/expected.yaml
index cdeaa122..d151fb4c 100644
--- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-without-params/expected.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-without-params/expected.yaml
@@ -24,13 +24,16 @@ spec:
     - description: the git sha of the base of the pull request
       name: PULL_BASE_SHA
       type: string
-    - description: git pull request number
+    - default: ""
+      description: git pull request number
       name: PULL_NUMBER
       type: string
-    - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+    - default: ""
+      description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
       name: PULL_PULL_REF
       type: string
-    - description: git revision to checkout (branch, tag, sha, ref…)
+    - default: ""
+      description: git revision to checkout (branch, tag, sha, ref…)
       name: PULL_PULL_SHA
       type: string
     - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -94,13 +97,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/taskrun/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/taskrun/expected.yaml
index 6efa952f..a0cc663d 100644
--- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/taskrun/expected.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/taskrun/expected.yaml
@@ -25,13 +25,16 @@ spec:
     - description: the git sha of the base of the pull request
       name: PULL_BASE_SHA
       type: string
-    - description: git pull request number
+    - default: ""
+      description: git pull request number
       name: PULL_NUMBER
       type: string
-    - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+    - default: ""
+      description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
       name: PULL_PULL_REF
       type: string
-    - description: git revision to checkout (branch, tag, sha, ref…)
+    - default: ""
+      description: git revision to checkout (branch, tag, sha, ref…)
       name: PULL_PULL_SHA
       type: string
     - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'
@@ -98,13 +101,16 @@ spec:
         - description: the git sha of the base of the pull request
           name: PULL_BASE_SHA
           type: string
-        - description: git pull request number
+        - default: ""
+          description: git pull request number
           name: PULL_NUMBER
           type: string
-        - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
+        - default: ""
+          description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'
           name: PULL_PULL_REF
           type: string
-        - description: git revision to checkout (branch, tag, sha, ref…)
+        - default: ""
+          description: git revision to checkout (branch, tag, sha, ref…)
           name: PULL_PULL_SHA
           type: string
         - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'