Repository: openshift-pipelines/pipelines-as-code (go)

Issue:
Refactoring: Remove the passing by argument keep only payload  
I tought it would be a good idea to be able to specify by arguments, but doing this via payload is much nicer and handle much more case while using github go client. So let's remove all the argument parsing stuff and keep only passing by payload file.


Pull request:
Let remove passing by arguments,
Let only use a payload file, this would scale better to multiple VCS

Fixes #92 

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>

Patch:
diff --git a/README.md b/README.md
index cc87ba0f..15927972 100644
--- a/README.md
+++ b/README.md
@@ -2,31 +2,32 @@
 
 # Pipelines as Code
 
-Pipelines as Code is an opinionated CI based on OpenShift Pipelines / Tekton.
+Pipelines as Code, an opinionated CI based on OpenShift Pipelines / Tekton.
 
 ## Introduction
 
 Pipelines as Code let you use the pipelines as Code flow directly with OpenShift
 Pipelines.
 
-The Pipelines as Code technique can be described in this web page
+Pipelines as Code technique can be described in this web page
 [https://www.thoughtworks.com/radar/techniques/pipelines-as-code](https://www.thoughtworks.com/radar/techniques/pipelines-as-code) it allows you
 to have your pipelines "sits and live" inside the same repository where your
 code is.
 
-The goal of Pipelines as Code is to let you define your
-[Tekton](https://tekton.cd) templates inside your source code repository and have the pipeline run and report the status of the execution when triggered by a Pull Request or a branch push.
+The goal of Pipelines as Code is to let you write your
+[Tekton](https://tekton.cd) templates within your repository and let Pipelines
+as Code runs and reports the pipeline status on Pull Request or branch push.
 
 ## Components
 
-Pipelines as Code is built on the following technologies :
+Pipelines as Code leverage on this technologies :
 
 - [Tekton Triggers](github.com/tektoncd/triggers): A Tekton Triggers
-  EventListener is spun up in a central namespace (`pipelines-as-code`). The
-  EventListener is the service responsible for listening to webhook events and acting upon it.
+  EventListenner is spun up in a central namespace (`pipelines-as-code`). The
+  EventListenner listen for webhook events and acts upon it.
 
-- Repository CRD: The Repository CRD is a new API introduced in the Pipelines as Code project. This CRD is used to define the association between the source code repository and the 
-Kubernetes namespace in which the corresponding Pipelines are run.
+- Repository CRD: A new CRD introduced with Pipelines as Code, It allows the
+  user to specify which repo is started in which namespace they want.
 
 - Web VCS support. When iterating over a Pull Request, status and control is
   done on the platform.
@@ -73,19 +74,19 @@ EOF
 This will match all Pull Request coming to `github.com/linda/project` on branch
 main into the namespace `my-pipeline-ci`
 
-For security reasons, the Repository CR needs to be created
-in the namespace where Tekton Pipelines associated with the source code repository would be executed.
+For security reasons you need to make sure that the Repository CR is installed
+into the same namespace are where we want to execute them.
 
 ### Writting Tekton pipelines in `.tekton/` directory
 
 - Pipelines as Code tries to be as close to the tekton template as possible.
-  Usually you would write your template and save them with a ".yaml" extension  and
+  Usually you write your template and save them with a ".yaml" extension  and
   Pipelines as Code will run them.
 
-- Inside your pipeline you would need to be able to consume the commit as received from the
-  webhook by checking it out the repository from that ref. You would usually use
+- Inside your pipeline you need to be able the commit as received from the
+  webhook by checking it out the repository from that ref. You usually will use
   the [git-clone](https://github.com/tektoncd/catalog/blob/main/task/git-clone/)
-  task from catalog for the same. To be able to specify those parameters, Pipelines
+  task from catalog for this. To be able to specify those parameters, Pipelines
   as Code allows you to have those two variables filled between double brackets,
   i.e: `{{ var }}`:
 
@@ -223,11 +224,11 @@ If the object fetched cannot be parsed as a Tekton `Task` it will error out.
 
 ### Running the Pipeline
 
-* A user create a Pull Request.
+A user create a Pull Request.
 
-* If the user sending the Pull Request is not the owner of the repository or not a public member of the organization where the repository belong to, `Pipelines as Code` will not run.
+If the user sending the Pull Request is not the owner of the repository or not a public member of the organization where the repository belong to, `Pipelines as Code` will not run.
 
-* If the user sending the Pull Request is inside an OWNER file located in the repository root in the main branch (the main branch as defined in the Github configuration for the repo) in the `approvers` or `reviewers` section like this :
+If the user sending the Pull Request is inside an OWNER file located in the repository root in the main branch (the main branch as defined in the Github configuration for the repo) in the `approvers` or `reviewers` section like this :
 
 ```yaml
 approvers:
@@ -275,16 +276,16 @@ The failure is not with your PR but seems to be an infra issue.
 Status of  your pipeline execution is stored inside the Repo CustomResource :
 
 ```bash
-% kubectl get repo -n pipelines-as-code-ci
+% kubectl get repo -n pipelines-ascode-ci
 NAME                  URL                                                        NAMESPACE             SUCCEEDED   REASON      STARTTIME   COMPLETIONTIME
-pipelines-as-code-ci   https://github.com/openshift-pipelines/pipelines-as-code   pipelines-as-code-ci   True        Succeeded   59m         56m
+pipelines-ascode-ci   https://github.com/openshift-pipelines/pipelines-as-code   pipelines-ascode-ci   True        Succeeded   59m         56m
 ```
 
 The last 5 status are stored inside the CustomResource and can be accessed
 directly like this :
 
 ```json
-% kubectl get repo -n pipelines-as-code-ci -o json|jq .items[].pipelinerun_status
+% kubectl get repo -n pipelines-ascode-ci -o json|jq .items[].pipelinerun_status
 [
   {
     "completionTime": "2021-05-05T11:00:05Z",
@@ -333,7 +334,7 @@ the next steps on how to do that.
 
 ### Github configuration
 
-To setup Pipelines as Code on Github, you need to have a Github App created.
+To setup Pipelines as Code on GitHUB you need a GitHUB Apps created.
 
 You need the Webhook of the app pointing to your Ingress endpoint which would
 then go to the triggers enventlistenner/service.
@@ -366,11 +367,11 @@ When you have created the `github-app-secret` Secret, grab the private key the
 key in a file named for example `/tmp/github.app.key` and issue those commands :
 
 ```bash
-% kubectl -n openshift-pipelines-as-code create secret generic github-app-secret \
+% kubectl -n openshift-pipelines-ascode create secret generic github-app-secret \
         --from-literal private.key="$(cat /tmp/github.app.key)"
         --from-literal application_id="APPLICATION_ID_NUMBER" \
         --from-literal webhook.secret="WEBHOOK_SECRET"
 ```
 
 This secret is used to generate a token on behalf of the user running the event
-and make sure to validate the webhook via the webhook secret.
\ No newline at end of file
+and make sure to validate the webhook via the webhook secret.
diff --git a/config/100-namespace.yaml b/config/100-namespace.yaml
index ec774833..cfd14e2e 100644
--- a/config/100-namespace.yaml
+++ b/config/100-namespace.yaml
@@ -15,7 +15,7 @@
 apiVersion: v1
 kind: Namespace
 metadata:
-  name: pipelines-as-code
+  name: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
diff --git a/config/200-role.yaml b/config/200-role.yaml
index faae13b9..66ade1fb 100644
--- a/config/200-role.yaml
+++ b/config/200-role.yaml
@@ -18,20 +18,20 @@
 apiVersion: v1
 kind: ServiceAccount
 metadata:
-  name: openshift-pipelines-as-code-sa-el
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-sa-el
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 ---
 kind: Role
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
-  name: openshift-pipelines-as-code-role-el
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-role-el
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 rules:
   - apiGroups: ["triggers.tekton.dev"]
     resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"]
@@ -55,28 +55,28 @@ rules:
 apiVersion: rbac.authorization.k8s.io/v1
 kind: RoleBinding
 metadata:
-  name: openshift-pipelines-as-code-binding
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-binding
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 subjects:
   - kind: ServiceAccount
-    name: openshift-pipelines-as-code-sa-el
+    name: openshift-pipelines-ascode-sa-el
 roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: Role
-  name: openshift-pipelines-as-code-role-el
+  name: openshift-pipelines-ascode-role-el
 
 ---
 kind: ClusterRole
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
   name: openshift-pipeline-as-code-clusterrole
-  namespace: pipelines-as-code
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 rules:
   # Permissions to list repositories on cluster
   - apiGroups: [""]
@@ -102,15 +102,15 @@ rules:
 apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRoleBinding
 metadata:
-  name: openshift-pipelines-as-code-clusterbinding
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-clusterbinding
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 subjects:
 - kind: ServiceAccount
-  name: openshift-pipelines-as-code-sa-el
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-sa-el
+  namespace: pipelines-ascode
 roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: ClusterRole
diff --git a/config/300-repositories.yaml b/config/300-repositories.yaml
index cb938885..112ac48b 100644
--- a/config/300-repositories.yaml
+++ b/config/300-repositories.yaml
@@ -5,7 +5,7 @@ metadata:
   name: repositories.pipelinesascode.tekton.dev
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   group: pipelinesascode.tekton.dev
   versions:
diff --git a/config/400-trigger-eventlistenner.yaml b/config/400-trigger-eventlistenner.yaml
index 4ee24343..335e02bb 100644
--- a/config/400-trigger-eventlistenner.yaml
+++ b/config/400-trigger-eventlistenner.yaml
@@ -2,18 +2,18 @@
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: EventListener
 metadata:
-  name: openshift-pipelines-as-code-interceptor
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-interceptor
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
-  serviceAccountName: openshift-pipelines-as-code-sa-el
+  serviceAccountName: openshift-pipelines-ascode-sa-el
   triggers:
     # When you have a /retest in a comment to retest a PR
     - name: github-issue-comment-retest
       bindings:
-        - ref: openshift-pipelines-as-code-bindings-retest-comment
+        - ref: openshift-pipelines-ascode-bindings-retest-comment
       interceptors:
         - github:
             secretRef:
@@ -29,12 +29,12 @@ spec:
               'installation' in body &&
               body.comment.body.matches('(^|\\r\\n)/retest([ ]*$|$|\\r\\n)')
       template:
-        ref: openshift-pipelines-as-code-template-retest-comment
+        ref: openshift-pipelines-ascode-template-retest-comment
 
     # When you have a /ok-to-test in a comment to allow CI on a non owner sender
     - name: github-issue-comment-retest
       bindings:
-        - ref: openshift-pipelines-as-code-bindings-ok-to-test-comment
+        - ref: openshift-pipelines-ascode-bindings-ok-to-test-comment
       interceptors:
         - github:
             secretRef:
@@ -51,12 +51,12 @@ spec:
               body.comment.body.matches('(^|\\r\\n)/ok-to-test([ ]*$|$|\\r\\n)')
       template:
         # Using retest comment since it was the first one
-        ref: openshift-pipelines-as-code-template-retest-comment
+        ref: openshift-pipelines-ascode-template-retest-comment
 
     # Branch push using different binding but same triggertemplate as pullreq
     - name: github-branch-push
       bindings:
-        - ref: openshift-pipelines-as-code-bindings-push
+        - ref: openshift-pipelines-ascode-bindings-push
       interceptors:
         - github:
             secretRef:
@@ -69,12 +69,12 @@ spec:
               'installation' in body &&
               'pusher' in body
       template:
-        ref: openshift-pipelines-as-code-template-push
+        ref: openshift-pipelines-ascode-template-push
 
     # When using the UI and clicking on Re-run failed test
     - name: github-check-run-recheck
       bindings:
-        - ref: openshift-pipelines-as-code-bindings-recheck
+        - ref: openshift-pipelines-ascode-bindings-recheck
       interceptors:
         - github:
             secretRef:
@@ -86,12 +86,12 @@ spec:
             filter: >-
               body.action in ['rerequested'] && 'check_run' in body && 'installation' in body
       template:
-        ref: openshift-pipelines-as-code-template-recheck
+        ref: openshift-pipelines-ascode-template-recheck
 
     # When sending a new Pull Request
     - name: github-pull-request
       bindings:
-        - ref: openshift-pipelines-as-code-bindings-pullreq
+        - ref: openshift-pipelines-ascode-bindings-pullreq
       interceptors:
         - github:
             secretRef:
@@ -103,17 +103,17 @@ spec:
             filter: >-
               body.action in ['created', 'synchronize', 'opened'] && 'installation' in body
       template:
-        ref: openshift-pipelines-as-code-template-pullreq
+        ref: openshift-pipelines-ascode-template-pullreq
 # Triggers >0.13 Changed almost everything for EventListener
 # ---
 # apiVersion: triggers.tekton.dev/v1alpha1
 # kind: EventListener
 # metadata:
-#   name: openshift-pipelines-as-code-interceptor
-#   namespace: pipelines-as-code
+#   name: openshift-pipelines-ascode-interceptor
+#   namespace: pipelines-ascode
 #   labels:
 #     app.kubernetes.io/instance: default
-#     app.kubernetes.io/part-of: openshift-pipelines-as-code
+#     app.kubernetes.io/part-of: openshift-pipelines-ascode
 # spec:
 #   triggers:
 #     - name: github-listener
@@ -131,12 +131,12 @@ spec:
 #             - name: "filter"
 #               value: "body.action in ['created', 'opened', 'synchronize'] && 'installation' in body"
 #       bindings:
-#         - ref: openshift-pipelines-as-code-bindings
+#         - ref: openshift-pipelines-ascode-bindings
 #       template:
-#         ref: openshift-pipelines-as-code-template
+#         ref: openshift-pipelines-ascode-template
 #   resources:
 #     kubernetesResource:
 #       spec:
 #         template:
 #           spec:
-#             serviceAccountName: openshift-pipelines-as-code-sa-el
+#             serviceAccountName: openshift-pipelines-ascode-sa-el
diff --git a/config/401-trigger-issue-recheck.yaml b/config/401-trigger-issue-recheck.yaml
index 1996a14f..c7774233 100644
--- a/config/401-trigger-issue-recheck.yaml
+++ b/config/401-trigger-issue-recheck.yaml
@@ -2,11 +2,11 @@
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: TriggerBinding
 metadata:
-  name: openshift-pipelines-as-code-bindings-recheck
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-bindings-recheck
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   params:
     - name: action
@@ -28,11 +28,11 @@ spec:
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: TriggerTemplate
 metadata:
-  name: openshift-pipelines-as-code-template-recheck
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-template-recheck
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   params:
     - name: action
@@ -46,12 +46,12 @@ spec:
     - apiVersion: tekton.dev/v1beta1
       kind: PipelineRun
       metadata:
-        generateName: openshift-pipelines-as-code-run-
+        generateName: openshift-pipelines-ascode-run-
         labels:
-          tekton.dev/pipeline: openshift-pipelines-as-code
+          tekton.dev/pipeline: openshift-pipelines-ascode
           tekton.dev/pipelines-as-code-event: $(tt.params.event_type)
       spec:
-        serviceAccountName: openshift-pipelines-as-code-sa-el
+        serviceAccountName: openshift-pipelines-ascode-sa-el
         params:
           - name: action
             value: $(tt.params.action)
@@ -88,7 +88,7 @@ spec:
               workspaces:
                 - name: secrets
                   workspace: secrets
-            - name: openshift-pipelines-as-code
+            - name: openshift-pipelines-ascode
               runAfter: [get-token]
               taskSpec:
                 params:
diff --git a/config/402-trigger-pull-request.yaml b/config/402-trigger-pull-request.yaml
index d923c7e9..ade0cd0a 100644
--- a/config/402-trigger-pull-request.yaml
+++ b/config/402-trigger-pull-request.yaml
@@ -2,11 +2,11 @@
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: TriggerBinding
 metadata:
-  name: openshift-pipelines-as-code-bindings-pullreq
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-bindings-pullreq
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   params:
     - name: trigger_target
@@ -36,11 +36,11 @@ spec:
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: TriggerTemplate
 metadata:
-  name: openshift-pipelines-as-code-template-pullreq
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-template-pullreq
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   params:
     - name: event_type
@@ -58,12 +58,12 @@ spec:
     - apiVersion: tekton.dev/v1beta1
       kind: PipelineRun
       metadata:
-        generateName: openshift-pipelines-as-code-run-
+        generateName: openshift-pipelines-ascode-run-
         labels:
-          tekton.dev/pipeline: openshift-pipelines-as-code
+          tekton.dev/pipeline: openshift-pipelines-ascode
           tekton.dev/pipelines-as-code-event: $(tt.params.event_type)
       spec:
-        serviceAccountName: openshift-pipelines-as-code-sa-el
+        serviceAccountName: openshift-pipelines-ascode-sa-el
         params:
           - name: event_type
             value: $(tt.params.event_type)
@@ -112,7 +112,7 @@ spec:
               workspaces:
                 - name: secrets
                   workspace: secrets
-            - name: openshift-pipelines-as-code
+            - name: openshift-pipelines-ascode
               runAfter: [get-token]
               taskSpec:
                 params:
diff --git a/config/403-trigger-push.yaml b/config/403-trigger-push.yaml
index 952967be..de4fa9d1 100644
--- a/config/403-trigger-push.yaml
+++ b/config/403-trigger-push.yaml
@@ -2,11 +2,11 @@
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: TriggerBinding
 metadata:
-  name: openshift-pipelines-as-code-bindings-push
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-bindings-push
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   params:
     - name: "event_type"
@@ -36,11 +36,11 @@ spec:
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: TriggerTemplate
 metadata:
-  name: openshift-pipelines-as-code-template-push
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-template-push
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   params:
     - name: event_type
@@ -58,12 +58,12 @@ spec:
     - apiVersion: tekton.dev/v1beta1
       kind: PipelineRun
       metadata:
-        generateName: openshift-pipelines-as-code-run-
+        generateName: openshift-pipelines-ascode-run-
         labels:
-          tekton.dev/pipeline: openshift-pipelines-as-code
+          tekton.dev/pipeline: openshift-pipelines-ascode
           tekton.dev/pipelines-as-code-event: $(tt.params.event_type)
       spec:
-        serviceAccountName: openshift-pipelines-as-code-sa-el
+        serviceAccountName: openshift-pipelines-ascode-sa-el
         params:
           - name: event_type
             value: $(tt.params.event_type)
@@ -112,7 +112,7 @@ spec:
               workspaces:
                 - name: secrets
                   workspace: secrets
-            - name: openshift-pipelines-as-code
+            - name: openshift-pipelines-ascode
               runAfter: [get-token]
               taskSpec:
                 params:
diff --git a/config/500-task-github-app-token.yaml b/config/500-task-github-app-token.yaml
index f1fbd35e..15ecf600 100644
--- a/config/500-task-github-app-token.yaml
+++ b/config/500-task-github-app-token.yaml
@@ -4,10 +4,10 @@ apiVersion: tekton.dev/v1beta1
 kind: Task
 metadata:
   name: github-app-token
-  namespace: pipelines-as-code
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
     app.kubernetes.io/version: "0.2"
   annotations:
     tekton.dev/pipelines.minVersion: "0.12.1"
diff --git a/hack/replay-gh-events.py b/hack/replay-gh-events.py
index 4da21a7a..6fe18fb5 100755
--- a/hack/replay-gh-events.py
+++ b/hack/replay-gh-events.py
@@ -25,9 +25,9 @@ import subprocess
 
 import requests
 
-NAMESPACE = "pipelines-as-code"
+NAMESPACE = "pipelines-ascode"
 SECRET_NAME = "github-app-secret"
-ELNAME = "openshift-pipelines-as-code"
+ELNAME = "openshift-pipelines-ascode"
 
 
 def get_el_route():
diff --git a/pkg/cmd/pipelineascode/pipelineascode.go b/pkg/cmd/pipelineascode/pipelineascode.go
index e40d98d2..64a90af8 100644
--- a/pkg/cmd/pipelineascode/pipelineascode.go
+++ b/pkg/cmd/pipelineascode/pipelineascode.go
@@ -57,36 +57,34 @@ func Command(p cli.Params) *cobra.Command {
 
 	flags.AddPacOptions(cmd)
 
-	cmd.Flags().StringVarP(&opts.RunInfo.SHA, "webhook-sha", "", os.Getenv("PAC_SHA"), "SHA to test")
-	cmd.Flags().StringVarP(&opts.RunInfo.Owner, "webhook-owner", "", os.Getenv("PAC_OWNER"), "Owner of the of the repository to test")
-	cmd.Flags().StringVarP(&opts.RunInfo.Repository, "webhook-repository", "", os.Getenv("PAC_REPOSITORY_NAME"), "Repository Name of the repository to test")
-	cmd.Flags().StringVarP(&opts.RunInfo.DefaultBranch, "webhook-defaultbranch", "", os.Getenv("PAC_DEFAULTBRANCH"), "DefaultBranch of the repository to test")
-	cmd.Flags().StringVarP(&opts.RunInfo.BaseBranch, "webhook-base-branch", "", os.Getenv("PAC_BASE_BRANCH"), "Base branch from where the SHA is based ie: main")
-	cmd.Flags().StringVarP(&opts.RunInfo.HeadBranch, "webhook-head-branch", "", os.Getenv("PAC_HEAD_BRANCH"), "Head branch of the SHA ie: pr")
-	cmd.Flags().StringVarP(&opts.RunInfo.Sender, "webhook-sender", "", os.Getenv("PAC_Sender"), "Sender for the commit/pr")
-	cmd.Flags().StringVarP(&opts.RunInfo.URL, "webhook-url", "", os.Getenv("PAC_URL"), "URL of the repository to test")
-	cmd.Flags().StringVarP(&opts.RunInfo.EventType, "webhook-type", "", os.Getenv("PAC_EVENT_TYPE"), "Payload event type as set from Github")
+	cmd.Flags().StringVarP(&opts.RunInfo.EventType, "webhook-type", "", os.Getenv("PAC_EVENT_TYPE"), "Payload event type as set from Github (ie: X-GitHub-Event header)")
 	cmd.Flags().StringVarP(&opts.RunInfo.TriggerTarget, "trigger-target", "", os.Getenv("PAC_TRIGGER_TARGET"), "The trigger target from where this event comes from")
-
-	cmd.Flags().StringVarP(&opts.Payload, "payload", "", os.Getenv("PAC_PAYLOAD"), "The payload from webhook as string")
 	cmd.Flags().StringVarP(&opts.PayloadFile, "payload-file", "", os.Getenv("PAC_PAYLOAD_FILE"), "A file containing the webhook payload")
 	return cmd
 }
 
-func getRunInfoFromArgsOrPayload(ctx context.Context, cs *cli.Clients, payload string, runinfo *webvcs.RunInfo) (*webvcs.RunInfo, error) {
-	if err := runinfo.Check(); err == nil {
-		return runinfo, nil
-	} else if payload == "" {
-		return &webvcs.RunInfo{}, fmt.Errorf("no payload or not enough params set properly")
+func parsePayload(ctx context.Context, cs *cli.Clients, opts *pacpkg.Options) (*webvcs.RunInfo, error) {
+	if opts.PayloadFile == "" {
+		return nil, fmt.Errorf("no payload file has been passed")
+	}
+	_, err := os.Stat(opts.PayloadFile)
+	if err != nil {
+		return nil, err
+	}
+
+	payloadB, err := ioutil.ReadFile(opts.PayloadFile)
+	if err != nil {
+		return nil, err
 	}
 
-	payloadinfo, err := cs.GithubClient.ParsePayload(ctx, cs.Log, runinfo.EventType, runinfo.TriggerTarget, payload)
+	payloadinfo, err := cs.GithubClient.ParsePayload(ctx, cs.Log, opts.RunInfo.EventType,
+		opts.RunInfo.TriggerTarget, string(payloadB))
 	if err != nil {
 		return &webvcs.RunInfo{}, err
 	}
 
 	if err := payloadinfo.Check(); err != nil {
-		return &webvcs.RunInfo{}, fmt.Errorf("invalid Payload, missing some values : %+v", runinfo)
+		return &webvcs.RunInfo{}, fmt.Errorf("invalid Payload, missing some values : %+v", payloadinfo)
 	}
 
 	return payloadinfo, nil
@@ -94,20 +92,7 @@ func getRunInfoFromArgsOrPayload(ctx context.Context, cs *cli.Clients, payload s
 
 // Wrap around a Run, create a CheckStatusID if there is a failure.
 func runWrap(ctx context.Context, opts *pacpkg.Options, cs *cli.Clients, kinteract cli.KubeInteractionIntf) error {
-	if opts.PayloadFile != "" {
-		_, err := os.Stat(opts.PayloadFile)
-		if err != nil {
-			return err
-		}
-
-		b, err := ioutil.ReadFile(opts.PayloadFile)
-		if err != nil {
-			return err
-		}
-		opts.Payload = string(b)
-	}
-
-	runinfo, err := getRunInfoFromArgsOrPayload(ctx, cs, opts.Payload, &opts.RunInfo)
+	runinfo, err := parsePayload(ctx, cs, opts)
 	if err != nil {
 		return err
 	}
diff --git a/pkg/pipelineascode/pipelineascode.go b/pkg/pipelineascode/pipelineascode.go
index 5385032a..44ea454f 100644
--- a/pkg/pipelineascode/pipelineascode.go
+++ b/pkg/pipelineascode/pipelineascode.go
@@ -19,7 +19,6 @@ const (
 )
 
 type Options struct {
-	Payload     string
 	PayloadFile string
 	RunInfo     webvcs.RunInfo
 }


Test patch:
diff --git a/config/404-trigger-retest-comment.yaml b/config/404-trigger-retest-comment.yaml
index c1616467..18f44d34 100644
--- a/config/404-trigger-retest-comment.yaml
+++ b/config/404-trigger-retest-comment.yaml
@@ -2,11 +2,11 @@
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: TriggerBinding
 metadata:
-  name: openshift-pipelines-as-code-bindings-retest-comment
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-bindings-retest-comment
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   params:
     - name: trigger_target
@@ -29,11 +29,11 @@ spec:
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: TriggerTemplate
 metadata:
-  name: openshift-pipelines-as-code-template-retest-comment
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-template-retest-comment
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   params:
     - name: action
@@ -48,12 +48,12 @@ spec:
     - apiVersion: tekton.dev/v1beta1
       kind: PipelineRun
       metadata:
-        generateName: openshift-pipelines-as-code-run-
+        generateName: openshift-pipelines-ascode-run-
         labels:
-          tekton.dev/pipeline: openshift-pipelines-as-code
+          tekton.dev/pipeline: openshift-pipelines-ascode
           tekton.dev/pipelines-as-code-event: $(tt.params.event_type)
       spec:
-        serviceAccountName: openshift-pipelines-as-code-sa-el
+        serviceAccountName: openshift-pipelines-ascode-sa-el
         params:
           - name: action
             value: $(tt.params.action)
@@ -93,7 +93,7 @@ spec:
               workspaces:
                 - name: secrets
                   workspace: secrets
-            - name: openshift-pipelines-as-code
+            - name: openshift-pipelines-ascode
               runAfter: [get-token]
               taskSpec:
                 params:
diff --git a/config/405-trigger-ok-to-test-comment.yaml b/config/405-trigger-ok-to-test-comment.yaml
index ae7d7791..52bc8dba 100644
--- a/config/405-trigger-ok-to-test-comment.yaml
+++ b/config/405-trigger-ok-to-test-comment.yaml
@@ -2,11 +2,11 @@
 apiVersion: triggers.tekton.dev/v1alpha1
 kind: TriggerBinding
 metadata:
-  name: openshift-pipelines-as-code-bindings-ok-to-test-comment
-  namespace: pipelines-as-code
+  name: openshift-pipelines-ascode-bindings-ok-to-test-comment
+  namespace: pipelines-ascode
   labels:
     app.kubernetes.io/instance: default
-    app.kubernetes.io/part-of: openshift-pipelines-as-code
+    app.kubernetes.io/part-of: openshift-pipelines-ascode
 spec:
   params:
     - name: action
diff --git a/pkg/cmd/pipelineascode/pipelineascode_test.go b/pkg/cmd/pipelineascode/pipelineascode_test.go
index 404d8252..ce5502ab 100644
--- a/pkg/cmd/pipelineascode/pipelineascode_test.go
+++ b/pkg/cmd/pipelineascode/pipelineascode_test.go
@@ -17,6 +17,7 @@ import (
 	"go.uber.org/zap"
 	zapobserver "go.uber.org/zap/zaptest/observer"
 	"gotest.tools/v3/assert"
+	"gotest.tools/v3/fs"
 	rtesting "knative.dev/pkg/reconciler/testing"
 )
 
@@ -27,7 +28,7 @@ func TestCommandTokenSetProperly(t *testing.T) {
 	o := bytes.NewBufferString("")
 	cmd.SetErr(e)
 	cmd.SetOut(o)
-	cmd.SetArgs([]string{"--webhook-sha", "abcd"})
+	cmd.SetArgs([]string{"--trigger-target", "push"})
 	err := cmd.Execute()
 	assert.ErrorContains(t, err, "token option is not set properly")
 }
@@ -85,18 +86,6 @@ func TestGetInfo(t *testing.T) {
 			Client: fakeclient,
 		},
 	}
-	goodRunInfo := webvcs.RunInfo{
-		Owner:         "foo",
-		Repository:    "bar",
-		DefaultBranch: "main",
-		SHA:           "d0d0",
-		URL:           "https://chmouel.com",
-		BaseBranch:    "goodRuninfoBranch",
-		HeadBranch:    "headRunInfoBranch",
-		Sender:        "ElSender",
-		EventType:     "pull_request",
-		TriggerTarget: "pull_request",
-	}
 
 	b, err := ioutil.ReadFile("testdata/pull_request.json")
 	assert.NilError(t, err)
@@ -136,7 +125,7 @@ func TestGetInfo(t *testing.T) {
 			desc:    "No payload no runcheck",
 			runinfo: webvcs.RunInfo{},
 			payload: "",
-			errmsg:  "no payload or not enough params",
+			errmsg:  "unknown X-Github-Event in message:",
 		},
 		{
 			desc: "Bad runinfo with missing infos",
@@ -145,7 +134,7 @@ func TestGetInfo(t *testing.T) {
 				EventType: "pull_request",
 			},
 			payload: "",
-			errmsg:  "no payload or not enough params",
+			errmsg:  "unexpected end of JSON input",
 		},
 		{
 			desc:    "Missing values payload",
@@ -153,13 +142,6 @@ func TestGetInfo(t *testing.T) {
 			payload: missingValuesPayload,
 			errmsg:  "missing some values",
 		},
-		{
-			desc:           "Good runinfo",
-			runinfo:        goodRunInfo,
-			payload:        "",
-			errmsg:         "",
-			branchShouldBe: "goodRuninfoBranch",
-		},
 		{
 			desc:           "Good payload",
 			runinfo:        webvcs.RunInfo{EventType: "pull_request", TriggerTarget: "pull_request"},
@@ -170,7 +152,14 @@ func TestGetInfo(t *testing.T) {
 	}
 	for _, tC := range testCases {
 		t.Run(tC.desc, func(t *testing.T) {
-			runinfo, err := getRunInfoFromArgsOrPayload(ctx, cs, tC.payload, &tC.runinfo)
+			file := fs.NewFile(t, "test-payload", fs.WithContent(tC.payload))
+			defer file.Remove()
+
+			opts := &pacpkg.Options{
+				PayloadFile: file.Path(),
+				RunInfo:     tC.runinfo,
+			}
+			runinfo, err := parsePayload(ctx, cs, opts)
 			if tC.errmsg != "" {
 				assert.ErrorContains(t, err, tC.errmsg)
 			} else {