Repository: jenkins-x/lighthouse
Pull request #1183 (2020-12-21 16:10:36)

fix: provide auth token early for gitea as it is required
Fixes https://github.com/jenkins-x/lighthouse/issues/1182

jenkins-x-bot: Hi @cameronbraid. 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 **daveconde**
You can assign the PR to them by writing `/assign @daveconde` 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":["daveconde"]} -->
abayer: /ok-to-test
/lgtm
jenkins-x-bot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *[abayer](https://github.com/jenkins-x/lighthouse/pull/1183#issuecomment-749075135 "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-749075135/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":[]} -->
jenkins-x-bot: @cameronbraid: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
tekton | 0e1b1c1cdb56faac1034137bc8e7fee228ab4350 | [link](https://dashboard-jx.jenkins-x.live/teams/jx/projects/jenkins-x/lighthouse/PR-1183/5) | `/test tekton`

[View all Builds for this Pull Request](https://dashboard-jx.jenkins-x.live/teams/jx/projects/jenkins-x/lighthouse/PR-1183) 

<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. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
abayer: /retest

Patch:
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 22e69497..a70e2b96 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.200]() | 
+[jenkins-x/go-scm](https://github.com/jenkins-x/go-scm) |  | [1.5.201]() | 
diff --git a/dependency-matrix/matrix.yaml b/dependency-matrix/matrix.yaml
index 707dfaab..bcd52fc9 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.200
+  version: 1.5.201
   versionURL: ""
diff --git a/go.mod b/go.mod
index 4ee32270..31efd3c2 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.200
+	github.com/jenkins-x/go-scm v1.5.201
 	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 e44bd5d8..49a220c6 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.200 h1:5DfzReL6BgiwsbRfjWJr4KCQf7wreH1uj9n9dcXsbp8=
-github.com/jenkins-x/go-scm v1.5.200/go.mod h1:pTp8HHrCEVGs24H/8Cy+X/CDXFlKv9VC6zmrXBYNkfE=
+github.com/jenkins-x/go-scm v1.5.201 h1:s2Z6C/PZLBP81JEproBTbAme9pK7zKFxpSwf4b+nc38=
+github.com/jenkins-x/go-scm v1.5.201/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/keeper/githubapp/factory.go b/pkg/keeper/githubapp/factory.go
index 646cb9e6..a32020e2 100644
--- a/pkg/keeper/githubapp/factory.go
+++ b/pkg/keeper/githubapp/factory.go
@@ -1,6 +1,7 @@
 package githubapp
 
 import (
+	"github.com/jenkins-x/go-scm/scm"
 	"github.com/jenkins-x/go-scm/scm/factory"
 	"github.com/jenkins-x/lighthouse/pkg/clients"
 	"github.com/jenkins-x/lighthouse/pkg/config"
@@ -20,7 +21,14 @@ func NewKeeperController(configAgent *config.Agent, botName string, gitKind stri
 		return NewGitHubAppKeeperController(githubAppSecretDir, configAgent, botName, gitKind, maxRecordsPerPool, historyURI, statusURI, ns)
 	}
 
-	scmClient, err := factory.NewClient(gitKind, serverURL, "")
+	var scmClient *scm.Client
+	var err error
+	if gitKind == "gitea" {
+		// gitea returns 403 if the gitToken isn't passed here
+		scmClient, err = factory.NewClient(gitKind, serverURL, gitToken)
+	} else {
+		scmClient, err = factory.NewClient(gitKind, serverURL, "")
+	}
 	if err != nil {
 		return nil, errors.Wrap(err, "cannot create SCM client")
 	}
diff --git a/pkg/triggerconfig/inrepo/calculate.go b/pkg/triggerconfig/inrepo/calculate.go
index 6c910b59..2d1a6c70 100644
--- a/pkg/triggerconfig/inrepo/calculate.go
+++ b/pkg/triggerconfig/inrepo/calculate.go
@@ -46,5 +46,5 @@ func Generate(fileBrowser filebrowser.Interface, sharedConfig *config.Config, sh
 			}
 		}
 	}
-	return &cfg, &pluginCfg, errors.Wrapf(err, "failed to create trigger config from local source for repo %s/%s ref %s", owner, repo, eventRef)
+	return &cfg, &pluginCfg, nil
 }
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: