Repository: jenkins-x/lighthouse
Pull request #1179 (2020-12-20 15:57:46)

fix: build pull request broken when run_if_changed is set
The problem found when user specified `run_if_changed` in triggers.yaml. It can make lighthouse crash with nil pointer dereference panic because `run_if_changed` required to compile regular expression before use it. The workaround for this problem fixed in https://github.com/jenkins-x/lighthouse/commit/ff0c2cb55ba0b184a4059fe5f0877a2a33f2f3de. After dig down into the problem, I found that configuration doesn't initialize before validate (ref this function call https://github.com/wingyplus/lighthouse/blob/25e654ab141d8280b97c4aa9c7e9279a0d35fe12/pkg/triggerconfig/merge/merge.go#L87). So try fix it by add `cfg.Init` before `cfg.Validate` calls. 

After adding Init function calls. I found that tests was fail due to `rerun_command` doesn't be the subset of `trigger` and field name is incorrect, such as `rerunCommand` (should be `rerun_command`) or `alwaysRun`( should be `always_run`). This changes correct the field name and add `retest` rerun_command to be the subset of `trigger` to make tests pass.

jenkins-x-bot: Hi @wingyplus. Thanks for your PR.

I'm waiting for a [jenkins-x](https://github.com/orgs/jenkins-x/people) member to verify that this patch is reasonable to test. If it is, they should reply with `/ok-to-test` on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should [join the org](https://github.com/orgs/jenkins-x/people) to skip this step.

Once the patch is verified, the new status will be reflected by the `ok-to-test` label.

I understand the commands that are listed [here](https://go.k8s.io/bot-commands?repo=jenkins-x%2Flighthouse).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [jenkins-x/lighthouse](https://github.com/jenkins-x/lighthouse/issues/new?title=Command%20issue:) repository.
</details>

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"]} -->

Patch:
diff --git a/README.md b/README.md
index 2c4b7bec..438b35cf 100644
--- a/README.md
+++ b/README.md
@@ -146,6 +146,38 @@ dlv --listen=:2345 --headless=true --api-version=2 exec ./bin/lighthouse -- $*
 
 You can then debug from your Go-based IDE (e.g. GoLand / IDEA / VS Code).
 
+### Debugging webhooks
+
+If you want to debug lighthouse locally from webhooks in your cluster there are a couple of tools that could help:
+
+#### Localizer
+
+If you [install localizer](https://github.com/jaredallard/localizer#install-localizer) (see [the blog for more detail](https://blog.jaredallard.me/localizer-an-adventure-in-creating-a-reverse-tunnel-and-tunnel-manager-for-kubernetes/) you can easily debug webhooks on your cluster.
+
+* first run localizer:
+
+```bash 
+sudo localizer
+```
+
+Then run/debug lighthouse locally. 
+
+e.g. in your IDE run the [cmd/webhooks/main.go](https://github.com/jenkins-x/lighthouse/blob/master/cmd/webhooks/main.go) (passing `--namespace jx` as program arguments)
+
+Then to get the webhooks to trigger your local process:
+
+```bash 
+localizer expose jx/hook --map 80:8080
+```
+
+when you have finished debugging, return things to normal via:
+
+```bash 
+localizer expose jx/hook --stop
+```
+
+
+#### Telepresence 
 You can replace the running version in your cluster with the one running locally using [telepresence](https://www.telepresence.io/).  
 For webhooks, just run:
 ```bash
diff --git a/bdd/bbs/ci.sh b/bdd/bbs/ci.sh
index 48fc3c7b..56c1c545 100755
--- a/bdd/bbs/ci.sh
+++ b/bdd/bbs/ci.sh
@@ -16,6 +16,12 @@ export XDG_CONFIG_HOME=$JX_HOME
 
 mkdir -p $JX_HOME/git
 
+# TODO hack until we fix boot to do this too!
+helm init --client-only --skip-refresh
+helm repo rm stable
+helm repo add stable https://charts.helm.sh/stable
+helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
+
 jx install dependencies --all
 
 jx --version
@@ -72,10 +78,6 @@ export BDD_ENABLE_TEST_CHATOPS_COMMANDS="true"
 
 echo "Building lighthouse with version $VERSION"
 
-# TODO hack until we fix boot to do this too!
-helm init --client-only
-helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
-
 # Enable checking the commit status reporting URL
 export BDD_LIGHTHOUSE_BASE_REPORT_URL=https://example.com
 
diff --git a/bdd/ghe/ci.sh b/bdd/ghe/ci.sh
index f1062ae5..73ad0833 100755
--- a/bdd/ghe/ci.sh
+++ b/bdd/ghe/ci.sh
@@ -15,6 +15,12 @@ export XDG_CONFIG_HOME=$JX_HOME
 
 mkdir -p $JX_HOME/git
 
+# TODO hack until we fix boot to do this too!
+helm init --client-only --skip-refresh
+helm repo rm stable
+helm repo add stable https://charts.helm.sh/stable
+helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
+
 jx install dependencies --all
 
 jx --version
@@ -68,10 +74,6 @@ sed -e s/\$VERSION/${VERSION}/g ../bdd/helm-requirements.yaml.template > env/req
 
 echo "Building lighthouse with version $VERSION"
 
-# TODO hack until we fix boot to do this too!
-helm init --client-only
-helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
-
 export BDD_ENABLE_TEST_CHATOPS_COMMANDS="true"
 
 # Enable checking the commit status reporting URL
diff --git a/bdd/github/ci.sh b/bdd/github/ci.sh
index e4ddbb18..54012d3a 100755
--- a/bdd/github/ci.sh
+++ b/bdd/github/ci.sh
@@ -16,6 +16,12 @@ export XDG_CONFIG_HOME=$JX_HOME
 
 mkdir -p $JX_HOME/git
 
+# TODO hack until we fix boot to do this too!
+helm init --client-only --skip-refresh
+helm repo rm stable
+helm repo add stable https://charts.helm.sh/stable
+helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
+
 jx install dependencies --all
 
 jx --version
@@ -68,10 +74,6 @@ sed -e s/\$VERSION/${VERSION}/g ../bdd/helm-requirements.yaml.template > env/req
 
 echo "Building lighthouse with version $VERSION"
 
-# TODO hack until we fix boot to do this too!
-helm init --client-only
-helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
-
 export BDD_ENABLE_TEST_CHATOPS_COMMANDS="true"
 
 # Enable checking the commit status reporting URL
diff --git a/bdd/gitlab/ci.sh b/bdd/gitlab/ci.sh
index cb4b887c..2dfe2c9d 100755
--- a/bdd/gitlab/ci.sh
+++ b/bdd/gitlab/ci.sh
@@ -16,6 +16,12 @@ export XDG_CONFIG_HOME=$JX_HOME
 
 mkdir -p $JX_HOME/git
 
+# TODO hack until we fix boot to do this too!
+helm init --client-only --skip-refresh
+helm repo rm stable
+helm repo add stable https://charts.helm.sh/stable
+helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
+
 jx install dependencies --all
 
 jx --version
@@ -68,10 +74,6 @@ sed -e s/\$VERSION/${VERSION}/g ../bdd/helm-requirements.yaml.template > env/req
 
 echo "Building lighthouse with version $VERSION"
 
-# TODO hack until we fix boot to do this too!
-helm init --client-only
-helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
-
 export BDD_ENABLE_TEST_CHATOPS_COMMANDS="true"
 
 # Enable checking the commit status reporting URL
diff --git a/cmd/webhooks/main.go b/cmd/webhooks/main.go
index c564e992..a468d9fc 100644
--- a/cmd/webhooks/main.go
+++ b/cmd/webhooks/main.go
@@ -44,7 +44,7 @@ func gatherOptions(fs *flag.FlagSet, args ...string) options {
 	fs.StringVar(&o.path, "path", "/hook",
 		"The path to listen on for requests to trigger a pipeline run.")
 	fs.StringVar(&o.pluginFilename, "plugin-file", "", "Path to the plugins.yaml file. If not specified it is loaded from the 'plugins' ConfigMap")
-	fs.StringVar(&o.configFilename, "config-file", "", "7Path to the config.yaml file. If not specified it is loaded from the 'config' ConfigMap")
+	fs.StringVar(&o.configFilename, "config-file", "", "Path to the config.yaml file. If not specified it is loaded from the 'config' ConfigMap")
 	fs.StringVar(&o.botName, "bot-name", "", "The name of the bot user to run as. Defaults to $GIT_USER if not specified.")
 	fs.StringVar(&o.namespace, "namespace", "", "The namespace to listen in")
 
diff --git a/dependency-matrix/matrix.md b/dependency-matrix/matrix.md
index c690c045..22e69497 100644
--- a/dependency-matrix/matrix.md
+++ b/dependency-matrix/matrix.md
@@ -2,4 +2,4 @@
 
 Dependency | Sources | Version | Mismatched versions
 ---------- | ------- | ------- | -------------------
-[jenkins-x/go-scm](https://github.com/jenkins-x/go-scm) |  | [1.5.197]() | 
+[jenkins-x/go-scm](https://github.com/jenkins-x/go-scm) |  | [1.5.200]() | 
diff --git a/dependency-matrix/matrix.yaml b/dependency-matrix/matrix.yaml
index f3a1026e..707dfaab 100644
--- a/dependency-matrix/matrix.yaml
+++ b/dependency-matrix/matrix.yaml
@@ -3,5 +3,5 @@ dependencies:
   owner: jenkins-x
   repo: go-scm
   url: https://github.com/jenkins-x/go-scm
-  version: 1.5.197
+  version: 1.5.200
   versionURL: ""
diff --git a/go.mod b/go.mod
index cc096dea..4ee32270 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,7 @@ require (
 	github.com/gorilla/sessions v1.2.0
 	github.com/hashicorp/go-multierror v1.1.0
 	github.com/hashicorp/golang-lru v0.5.4
-	github.com/jenkins-x/go-scm v1.5.197
+	github.com/jenkins-x/go-scm v1.5.200
 	github.com/mattn/go-zglob v0.0.1
 	github.com/onsi/ginkgo v1.11.0
 	github.com/onsi/gomega v1.8.1
diff --git a/go.sum b/go.sum
index ec5ba2d7..e44bd5d8 100644
--- a/go.sum
+++ b/go.sum
@@ -596,8 +596,8 @@ github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/U
 github.com/jenkins-x/go-scm v1.5.65/go.mod h1:MgGRkJScE/rJ30J/bXYqduN5sDPZqZFITJopsnZmTOw=
 github.com/jenkins-x/go-scm v1.5.79/go.mod h1:PCT338UhP/pQ0IeEeMEf/hoLTYKcH7qjGEKd7jPkeYg=
 github.com/jenkins-x/go-scm v1.5.117/go.mod h1:PCT338UhP/pQ0IeEeMEf/hoLTYKcH7qjGEKd7jPkeYg=
-github.com/jenkins-x/go-scm v1.5.197 h1:AW1RrlPrQYhrJ46l7zHL3IPkqhFaLkACz+D2rZPSMsY=
-github.com/jenkins-x/go-scm v1.5.197/go.mod h1:pTp8HHrCEVGs24H/8Cy+X/CDXFlKv9VC6zmrXBYNkfE=
+github.com/jenkins-x/go-scm v1.5.200 h1:5DfzReL6BgiwsbRfjWJr4KCQf7wreH1uj9n9dcXsbp8=
+github.com/jenkins-x/go-scm v1.5.200/go.mod h1:pTp8HHrCEVGs24H/8Cy+X/CDXFlKv9VC6zmrXBYNkfE=
 github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
 github.com/jinzhu/gorm v0.0.0-20170316141641-572d0a0ab1eb/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo=
 github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs=
diff --git a/init-helm.sh b/init-helm.sh
new file mode 100755
index 00000000..2383836d
--- /dev/null
+++ b/init-helm.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+helm init --client-only --skip-refresh
+helm repo rm stable
+helm repo add stable https://charts.helm.sh/stable
diff --git a/jenkins-x.yml b/jenkins-x.yml
index bb87aa93..92036b55 100644
--- a/jenkins-x.yml
+++ b/jenkins-x.yml
@@ -27,10 +27,8 @@ pipelineConfig:
           steps:
           - name: init-helm
             image: alpine/helm:2.12.3
-            command: helm
-            args:
-              - init
-              - --client-only
+            command: ./init-helm.sh
+            dir: /workspace/source
 
           - name: helm-lint
             image: gcr.io/jenkinsxio/builder-go
diff --git a/pkg/triggerconfig/merge/merge.go b/pkg/triggerconfig/merge/merge.go
index f84b59c2..6562d33e 100644
--- a/pkg/triggerconfig/merge/merge.go
+++ b/pkg/triggerconfig/merge/merge.go
@@ -80,6 +80,10 @@ func ConfigMerge(cfg *config.Config, pluginsCfg *plugins.Configuration, repoConf
 	if err != nil {
 		return errors.Wrapf(err, "failed to validate plugins")
 	}
+	err = cfg.Init(cfg.ProwConfig)
+	if err != nil {
+		return errors.Wrapf(err, "failed to initialize config")
+	}
 	err = cfg.Validate(cfg.ProwConfig)
 	if err != nil {
 		return errors.Wrapf(err, "failed to validate config")


Test patch:
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/branchtest/refs/master/.lighthouse/triggers/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/branchtest/refs/master/.lighthouse/triggers/triggers.yaml
index 6930052a..386df5d9 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/branchtest/refs/master/.lighthouse/triggers/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/branchtest/refs/master/.lighthouse/triggers/triggers.yaml
@@ -4,10 +4,10 @@ spec:
   presubmits:
   - name: lint
     context: "lint"
-    alwaysRun: true
+    always_run: true
     optional: false
-    trigger: "/lint"
-    rerunCommand: "/relint"
+    trigger: "(?:/lint|/relint)"
+    rerun_command: "/relint"
     agent: tekton-pipeline
   postsubmits:
   - name: release
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/branchtest/refs/mybranch/.lighthouse/triggers/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/branchtest/refs/mybranch/.lighthouse/triggers/triggers.yaml
index 6167aef2..dd85b09b 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/branchtest/refs/mybranch/.lighthouse/triggers/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/branchtest/refs/mybranch/.lighthouse/triggers/triggers.yaml
@@ -4,17 +4,17 @@ spec:
   presubmits:
   - name: lint
     context: "lint"
-    alwaysRun: true
+    always_run: true
     optional: false
-    trigger: "/lint"
-    rerunCommand: "/relint"
+    trigger: "(?:/lint|/relint)"
+    rerun_command: "/relint"
     agent: tekton-pipeline
   - name: newthingy
     context: "newthingy"
-    alwaysRun: true
+    always_run: true
     optional: false
-    trigger: "/newthingy"
-    rerunCommand: "/renewthingy"
+    trigger: "(?:/newthingy|/renewthingy)"
+    rerun_command: "/renewthingy"
     agent: tekton-pipeline
   postsubmits:
   - name: release
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-postsubmit/.lighthouse/duplicate-lint/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-postsubmit/.lighthouse/duplicate-lint/triggers.yaml
index 16af2e57..0d53e4ce 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-postsubmit/.lighthouse/duplicate-lint/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-postsubmit/.lighthouse/duplicate-lint/triggers.yaml
@@ -4,10 +4,10 @@ spec:
   presubmits:
   - name: lint
     context: "test"
-    alwaysRun: true
+    always_run: true
     optional: false
-    trigger: "/test"
-    rerunCommand: "/retest"
+    trigger: "(?:/test|/retest)"
+    rerun_command: "/retest"
     agent: tekton-pipeline
   postsubmits:
   - name: release
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-postsubmit/.lighthouse/linter/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-postsubmit/.lighthouse/linter/triggers.yaml
index a86284c4..0d1a47b2 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-postsubmit/.lighthouse/linter/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-postsubmit/.lighthouse/linter/triggers.yaml
@@ -4,12 +4,12 @@ spec:
   presubmits:
   - name: test
     context: "test"
-    alwaysRun: true
+    always_run: true
     optional: false
-    trigger: "/test"
-    rerunCommand: "/retest"
+    trigger: "(?:/test|/retest)"
+    rerun_command: "/retest"
     agent: tekton-pipeline
   postsubmits:
   - name: release
     context: "release"
-    agent: tekton-pipeline
\ No newline at end of file
+    agent: tekton-pipeline
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-presubmit/.lighthouse/duplicate-lint/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-presubmit/.lighthouse/duplicate-lint/triggers.yaml
index 16af2e57..0d53e4ce 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-presubmit/.lighthouse/duplicate-lint/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-presubmit/.lighthouse/duplicate-lint/triggers.yaml
@@ -4,10 +4,10 @@ spec:
   presubmits:
   - name: lint
     context: "test"
-    alwaysRun: true
+    always_run: true
     optional: false
-    trigger: "/test"
-    rerunCommand: "/retest"
+    trigger: "(?:/test|/retest)"
+    rerun_command: "/retest"
     agent: tekton-pipeline
   postsubmits:
   - name: release
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-presubmit/.lighthouse/linter/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-presubmit/.lighthouse/linter/triggers.yaml
index 372fea95..1cdb3e32 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-presubmit/.lighthouse/linter/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/duplicate-presubmit/.lighthouse/linter/triggers.yaml
@@ -4,9 +4,9 @@ spec:
   presubmits:
   - name: lint
     context: "lint"
-    alwaysRun: true
+    always_run: true
     optional: false
-    trigger: "/lint"
-    rerunCommand: "/relint"
+    trigger: "(?:/lint|/relint)"
+    rerun_command: "/relint"
     agent: tekton-pipeline
 
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/loadtest/.lighthouse/jenkins-x/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/loadtest/.lighthouse/jenkins-x/triggers.yaml
index e08bf03f..4a23d364 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/loadtest/.lighthouse/jenkins-x/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/loadtest/.lighthouse/jenkins-x/triggers.yaml
@@ -4,10 +4,10 @@ spec:
   presubmits:
   - name: test
     context: "test"
-    alwaysRun: true
+    always_run: true
     optional: false
-    trigger: "/test"
-    rerunCommand: "/retest"
+    trigger: "(?:/test|/retest)"
+    rerun_command: "/retest"
     agent: tekton-pipeline
   postsubmits:
   - name: release
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/loadtest/.lighthouse/linter/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/loadtest/.lighthouse/linter/triggers.yaml
index 372fea95..1cdb3e32 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/loadtest/.lighthouse/linter/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/loadtest/.lighthouse/linter/triggers.yaml
@@ -4,9 +4,9 @@ spec:
   presubmits:
   - name: lint
     context: "lint"
-    alwaysRun: true
+    always_run: true
     optional: false
-    trigger: "/lint"
-    rerunCommand: "/relint"
+    trigger: "(?:/lint|/relint)"
+    rerun_command: "/relint"
     agent: tekton-pipeline
 
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/myrepo/.lighthouse/jenkins-x/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/myrepo/.lighthouse/jenkins-x/triggers.yaml
index d5f8e659..d15685ce 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/myrepo/.lighthouse/jenkins-x/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/myrepo/.lighthouse/jenkins-x/triggers.yaml
@@ -6,7 +6,7 @@ spec:
     context: "test"
     always_run: true
     optional: false
-    trigger: "/test"
+    trigger: "(?:/test|/retest)"
     rerun_command: "/retest"
     source: "test.yaml"
     pipeline_run_params:
diff --git a/pkg/triggerconfig/inrepo/test_data/myorg/myrepo/.lighthouse/linter/triggers.yaml b/pkg/triggerconfig/inrepo/test_data/myorg/myrepo/.lighthouse/linter/triggers.yaml
index 6b0fdad2..9a1fe8d2 100644
--- a/pkg/triggerconfig/inrepo/test_data/myorg/myrepo/.lighthouse/linter/triggers.yaml
+++ b/pkg/triggerconfig/inrepo/test_data/myorg/myrepo/.lighthouse/linter/triggers.yaml
@@ -6,7 +6,7 @@ spec:
     context: "lint"
     always_run: true
     optional: false
-    trigger: "/lint"
+    trigger: "(?:/lint|/relint)"
     rerun_command: "/relint"
     source: "lint.yaml"
   branchProtection:
diff --git a/pkg/triggerconfig/merge/merge_test.go b/pkg/triggerconfig/merge/merge_test.go
index a74f6a7d..a2df0ce8 100644
--- a/pkg/triggerconfig/merge/merge_test.go
+++ b/pkg/triggerconfig/merge/merge_test.go
@@ -36,7 +36,7 @@ func TestMergeTriggerConfig(t *testing.T) {
 							},
 							AlwaysRun:    true,
 							Optional:     false,
-							Trigger:      "/lint",
+							Trigger:      "(?:/lint|/relint)",
 							RerunCommand: "/relint",
 							Reporter: job.Reporter{
 								Context: "lint",
diff --git a/pkg/triggerconfig/merge/test_data/simple/expected-config.yaml b/pkg/triggerconfig/merge/test_data/simple/expected-config.yaml
index 97d04f23..99d2861b 100644
--- a/pkg/triggerconfig/merge/test_data/simple/expected-config.yaml
+++ b/pkg/triggerconfig/merge/test_data/simple/expected-config.yaml
@@ -6,18 +6,22 @@ plank: {}
 postsubmits:
   myorg/myowner:
   - agent: tekton-pipeline
+    cluster: default
     context: release
     name: release
+    namespace: ""
 presubmits:
   myorg/myowner:
   - agent: tekton-pipeline
     always_run: true
+    cluster: default
     context: lint
     name: lint
+    namespace: ""
     rerun_command: /relint
-    trigger: /lint
+    trigger: (?:/lint|/relint)
 push_gateway:
   serve_metrics: false
 tide:
   context_options:
-    required-if-present-contexts: null
\ No newline at end of file
+    required-if-present-contexts: null
diff --git a/pkg/triggerconfig/merge/test_data/simple/triggers.yaml b/pkg/triggerconfig/merge/test_data/simple/triggers.yaml
index 8cd2c076..386df5d9 100644
--- a/pkg/triggerconfig/merge/test_data/simple/triggers.yaml
+++ b/pkg/triggerconfig/merge/test_data/simple/triggers.yaml
@@ -6,7 +6,7 @@ spec:
     context: "lint"
     always_run: true
     optional: false
-    trigger: "/lint"
+    trigger: "(?:/lint|/relint)"
     rerun_command: "/relint"
     agent: tekton-pipeline
   postsubmits: