Repository: openshift-pipelines/pipelines-as-code
Pull request #520 (2022-04-05 09:24:56)

Update documentation and  markdownlint the md on CI
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>


codecov-commenter: # [Codecov](https://codecov.io/gh/openshift-pipelines/pipelines-as-code/pull/520?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) Report
> Merging [#520](https://codecov.io/gh/openshift-pipelines/pipelines-as-code/pull/520?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (19ee55c) into [main](https://codecov.io/gh/openshift-pipelines/pipelines-as-code/commit/ca7bbb26d760091982c1cbf340b00d422910ba81?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (ca7bbb2) will **increase** coverage by `0.01%`.
> The diff coverage is `n/a`.

```diff
@@            Coverage Diff             @@
##             main     #520      +/-   ##
==========================================
+ Coverage   73.17%   73.19%   +0.01%     
==========================================
  Files          55       55              
  Lines        3169     3178       +9     
==========================================
+ Hits         2319     2326       +7     
  Misses        641      641              
- Partials      209      211       +2     
```


| [Impacted Files](https://codecov.io/gh/openshift-pipelines/pipelines-as-code/pull/520?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | |
|---|---|---|
| [pkg/formatting/k8labels.go](https://codecov.io/gh/openshift-pipelines/pipelines-as-code/pull/520/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGtnL2Zvcm1hdHRpbmcvazhsYWJlbHMuZ28=) | `100.00% <0.00%> (ø)` | |
| [pkg/kubeinteraction/secrets.go](https://codecov.io/gh/openshift-pipelines/pipelines-as-code/pull/520/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGtnL2t1YmVpbnRlcmFjdGlvbi9zZWNyZXRzLmdv) | `67.34% <0.00%> (+3.24%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/openshift-pipelines/pipelines-as-code/pull/520?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/openshift-pipelines/pipelines-as-code/pull/520?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Last update [ca7bbb2...19ee55c](https://codecov.io/gh/openshift-pipelines/pipelines-as-code/pull/520?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).


Patch:
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 4a6dad4c..d1541033 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -7,7 +7,7 @@ your descriptive commit message(s)! -->
 
 # Submitter Checklist
 
-- [ ] ♽  Run `make test lint` before submitting a PR (ie: via [pre-push github hook](../hack/dev/prep-push-hook) no need to waste CPU cycle on CI 
+- [ ] ♽  Run `make test lint` before submitting a PR (ie: via [pre-push github hook](../hack/dev/prep-push-hook) no need to waste CPU cycle on CI
 - [ ] 📖 If you are adding a user facing feature or make a change of the behavior, please make sure to document it
 - [ ] 🧪 100% coverage is not a target but most of the time we would rather have a unit test if you make a code change.
 - [ ] 🎁 If that's something that is possible to do please make sure to check if we can add a e2e test.
diff --git a/.markdownlint.json b/.markdownlint.json
index 0e69ba56..57422b23 100644
--- a/.markdownlint.json
+++ b/.markdownlint.json
@@ -1,4 +1,6 @@
 {
   "line-length": false,
-  "first-header-h1": false
+  "first-header-h1": false,
+  "no-inline-html": false,
+  "MD025": false,
 }
diff --git a/.tekton/pull-request.yaml b/.tekton/pull-request.yaml
index 0b01a83e..4b26a099 100644
--- a/.tekton/pull-request.yaml
+++ b/.tekton/pull-request.yaml
@@ -47,6 +47,22 @@ spec:
           - name: source
             workspace: source
 
+      - name: markdownlint
+        runAfter:
+          - fetchit
+        taskSpec:
+          workspaces:
+            - name: source
+          steps:
+            - name: markdown-lint
+              image: quay.io/thegeeklab/markdownlint-cli
+              workingDir: $(workspaces.source.path)
+              script: |
+                markdownlint $(find . -type f -regex ".*md"  -not -regex '^./vendor/.*' -not -regex "^./docs/themes/.*" -not -regex "^./.git/.*" -print)
+        workspaces:
+          - name: source
+            workspace: source
+
       - name: unitlint
         runAfter:
           - fetchit
diff --git a/Makefile b/Makefile
index d769183c..bfa7a8c4 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ LDFLAGS=
 OUTPUT_DIR=bin
 
 YAML_FILES := $(shell find . -type f -regex ".*y[a]ml" -print)
+MD_FILES := $(shell find . -type f -regex ".*md"  -not -regex '^./vendor/.*' -not -regex "^./docs/themes/.*" -not -regex "^./.git/.*" -print)
 
 ifeq ($(PAC_VERSION),)
 	PAC_VERSION="$(shell git describe --tags --exact-match 2>/dev/null || echo nightly-`date +'%Y%m%d'`-`git rev-parse --short HEAD`)"
@@ -51,7 +52,7 @@ test-e2e:  test-e2e-cleanup ## run e2e tests
 	@go test -failfast -count=1 -tags=e2e $(GO_TEST_FLAGS) ./test
 
 .PHONY: lint
-lint: lint-go lint-yaml ## run all linters
+lint: lint-go lint-yaml lint-md ## run all linters
 
 .PHONY: lint-go
 lint-go: ## runs go linter on all go files
@@ -66,6 +67,12 @@ lint-yaml: ${YAML_FILES} ## runs yamllint on all yaml files
 	@echo "Linting yaml files..."
 	@yamllint -c .yamllint $(YAML_FILES)
 
+
+.PHONY: lint-md
+lint-md: ${MD_FILES} ## runs markdownlint on all markdown files
+	@echo "Linting markdown files..."
+	@markdownlint $(MD_FILES)
+
 .PHONY: test-unit
 test-unit: ## run unit tests
 	@echo "Cleaning test cache"
diff --git a/README.md b/README.md
index 18205388..dcb572db 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
 
 Pipelines as Code -- An opinionated CI based on OpenShift Pipelines / Tekton.
 
-Full documentation is available from https://pipelinesascode.com
+Full documentation is available from <https://pipelinesascode.com>
 
 ## Introduction
 
diff --git a/code-of-conduct.md b/code-of-conduct.md
index 3618a6ae..eb30e220 100644
--- a/code-of-conduct.md
+++ b/code-of-conduct.md
@@ -54,6 +54,6 @@ repercussions as determined by other members of the project's leadership.
 ## Attribution
 
 This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
-https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
+<https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
 
 [homepage]: https://www.contributor-covenant.org
diff --git a/docs/content/_index.md b/docs/content/_index.md
index 45f22be4..39f71e8b 100644
--- a/docs/content/_index.md
+++ b/docs/content/_index.md
@@ -18,6 +18,7 @@ of the execution when triggered by a `Pull Request` or a `Push`.
 ## Features
 
 {{< columns >}} <!-- begin columns block -->
+
 - Pull-request status support: When iterating over a Pull Request. Statuses and Control is done on GitHub.
 
 - GitHub Checks API support to set the status of a PipelineRun including rechecks
@@ -49,13 +50,12 @@ The easiest way to get started is to use the `tkn pac` CLI and its [bootstrap](/
 Start downloading and install the tkn-pac CLI following [these instructions](/docs/guide/cli#install) and
 while Connected to your cluster launch the command :
 
-
 ```bash
 -$ tkn pac bootstrap
 ```
 
-and follow the questions to get Pipelines as Code installed on your cluster. 
-It will then help you to create create a Github Application to connect your repositories to Pipelines as Code. 
+and follow the questions to get Pipelines as Code installed on your cluster.
+It will then help you to create create a Github Application to connect your repositories to Pipelines as Code.
 If you are in a source code project, it will immediately ask you if you want to have a sample `PipelineRun` for `Pipelines as Code`
 
 ## Walkthrough video
diff --git a/docs/content/dev/links.md b/docs/content/dev/links.md
index c6a36c8b..9e9b05f0 100644
--- a/docs/content/dev/links.md
+++ b/docs/content/dev/links.md
@@ -4,6 +4,6 @@
 
 ## Providers Doc
 
-* Bitbucket Server Rest API: https://docs.atlassian.com/bitbucket-server/rest/7.17.0/bitbucket-rest.html
-* Github API: https://docs.github.com/en/rest/reference
-* Gitlab API: https://docs.gitlab.com/ee/api/api_resources.html
+* [Bitbucket Server Rest API](https://docs.atlassian.com/bitbucket-server/rest/7.17.0/bitbucket-rest.html)
+* [Github API](https://docs.github.com/en/rest/reference)
+* [https://docs.gitlab.com/ee/api/api_resources.html](Gitlab API)
diff --git a/docs/content/docs/guide/_index.md b/docs/content/docs/guide/_index.md
index cac692fd..7ca8c90c 100644
--- a/docs/content/docs/guide/_index.md
+++ b/docs/content/docs/guide/_index.md
@@ -4,5 +4,4 @@ weight: 2
 ---
 # Pipelines as Code Usage Guide
 
-
 {{<section>}}
diff --git a/docs/content/docs/guide/autoringprs.md b/docs/content/docs/guide/autoringprs.md
index fcd24927..cd1d5602 100644
--- a/docs/content/docs/guide/autoringprs.md
+++ b/docs/content/docs/guide/autoringprs.md
@@ -4,7 +4,6 @@ weight: 3
 ---
 # Authoring PipelineRuns in `.tekton/` directory
 
-
 * Pipelines as Code will always try to be as close to the tekton template as
   possible. Usually you will write your template and save them with a ".yaml"
   extension and Pipelines as Code will run them.
@@ -23,13 +22,13 @@ weight: 3
   allows you to have those "dynamic" variables expanded. Those variables look
   like this `{{ var }}` and those are the one you can use:
 
-  - `{{repo_owner}}`: The repository owner.
-  - `{{repo_name}}`: The repository name.
-  - `{{repo_url}}`: The repository full URL.
-  - `{{revision}}`: The commit full sha revision.
-  - `{{sender}}`: The sender username (or accountid on some providers) of the commit.
-  - `{{source_branch}}`: The branch name where the event come from.
-  - `{{target_branch}}`: The branch name on which the event targets (same as `source_branch` for push events).
+  * `{{repo_owner}}`: The repository owner.
+  * `{{repo_name}}`: The repository name.
+  * `{{repo_url}}`: The repository full URL.
+  * `{{revision}}`: The commit full sha revision.
+  * `{{sender}}`: The sender username (or accountid on some providers) of the commit.
+  * `{{source_branch}}`: The branch name where the event come from.
+  * `{{target_branch}}`: The branch name on which the event targets (same as `source_branch` for push events).
 
 * You need at least one `PipelineRun` with a `PipelineSpec` or a separated
   `Pipeline` object. You can have embedded `TaskSpec` inside
@@ -111,6 +110,7 @@ For example :
     pipelinesascode.tekton.dev/on-cel-expression: |
       event == "pull_request" && target_branch == "main" && source_branch == "wip"
 ```
+
 Will match a `pull_request` event targeting the branch `main` coming from a branch called `wip`.
 
 The fields available are :
@@ -132,7 +132,7 @@ not the `experimental` branch I would have :
 
 You can find more information about the CEL language spec here :
 
-https://github.com/google/cel-spec/blob/master/doc/langdef.md
+<https://github.com/google/cel-spec/blob/master/doc/langdef.md>
 
 ## Example
 
diff --git a/docs/content/docs/guide/cli.md b/docs/content/docs/guide/cli.md
index 784eca75..0ea9db17 100644
--- a/docs/content/docs/guide/cli.md
+++ b/docs/content/docs/guide/cli.md
@@ -62,6 +62,7 @@ If you want to install from the git repository you can just do :
 ```shell
 go install github.com/openshift-pipelines/pipelines-as-code/cmd/tkn-pac
 ```
+
 {{< /tab >}}
 
 {{< tab "Arch" >}}
@@ -70,15 +71,15 @@ You can install `tkn-pac` from the [Arch User Repository](https://aur.archlinux.
 ```shell
 yay -S tkn-pac
 ```
-{{< /tab >}}
 
+{{< /tab >}}
 
 {{< /tabs >}}
 
-
 ## Commands
 
 {{< details "tkn pac bootstrap" >}}
+
 ### bootstrap
 
 `tkn pac bootstrap` command will help you getting started installing and configuring Pipelines as code. It currently supports the following providers:
@@ -94,6 +95,7 @@ You can override the URL with the flag `--route-url`.
 {{< /details >}}
 
 {{< details "tkn pac bootstrap github-app" >}}
+
 ### bootstrap github-app
 
 If you only want to create the Github application you can use `tkn pac bootstrap
@@ -104,18 +106,21 @@ github application and the secret with all the information needed in the
 {{< /details >}}
 
 {{< details "tkn pac repo create" >}}
+
 ### Repository creation
 
-`tkn pac repo create` -- will create a new Pipelines as Code Repository and a namespace where the pipelineruns command. It will also generate a sample file with a [PipelineRun](./autoringprs/) in the `.tekton` directory called `pipelinerun.yaml` targeting the `main` branch and the `pull_request` and `push` events.  You can customize this by editing the [PipelineRun](./autoringprs/) to target a different branch or event. 
+`tkn pac repo create` -- will create a new Pipelines as Code Repository and a namespace where the pipelineruns command. It will launch the `tkn pac generate` command right after the creation.
 {{< /details >}}
 
 {{< details "tkn pac repo list" >}}
+
 ### Repository Listing
 
 `tkn pac repo list` -- will list all the Pipelines as Code Repositories and display the last status of the runs associated with it.
 {{< /details >}}
 
 {{< details "tkn pac repo describe" >}}
+
 ### Repository Describe
 
 `tkn pac repo describe` -- will describe a Pipelines as Code Repository and the runs associated with it.
@@ -124,6 +129,7 @@ On modern terminal (ie: [iTerm2](https://iterm2.com/), [Windows Terminal](https:
 {{< /details >}}
 
 {{< details "tkn pac generate" >}}
+
 ### Generate
 
 `tkn pac generate`: will generate a simple pipelinerun to get you started with Pipelines as Code. It will try to be as smart as possible by detecting the current git information if you run the command from your source code.
@@ -132,6 +138,7 @@ It has some basic language detection and add extra task depending of the languag
 {{< /details >}}
 
 {{< details "tkn pac resolve" >}}
+
 ### Resolve
 
 `tkn-pac resolve`: will run a pipelinerun as if it were executed by pipelines
diff --git a/docs/content/docs/guide/privaterepo.md b/docs/content/docs/guide/privaterepo.md
index 85817446..0ca9b87a 100644
--- a/docs/content/docs/guide/privaterepo.md
+++ b/docs/content/docs/guide/privaterepo.md
@@ -68,4 +68,3 @@ You can see as well a full example [here](https://github.com/openshift-pipelines
 
 This behavior can be disabled by configuration, setting the `secret-auto-create` to false or true
 inside the [Pipelines-as-Code Configmap](/docs/install#pipelines-as-code-configuration-settings).
-
diff --git a/docs/content/docs/guide/repositorycrd.md b/docs/content/docs/guide/repositorycrd.md
index c90cad48..617509a2 100644
--- a/docs/content/docs/guide/repositorycrd.md
+++ b/docs/content/docs/guide/repositorycrd.md
@@ -2,7 +2,8 @@
 title: Repository CRD
 weight: 1
 ---
-## Repository CRD
+# Repository CRD
+
 The purposes of the Repository CRD  is:
 
 - To let _Pipelines as Code_ know that this event from this URL needs to be handled.
@@ -55,5 +56,3 @@ pipelinesascode.tekton.dev/target-namespace: "mynamespace"
 
 and Pipelines as Code will only match the repository in the mynamespace
 Namespace instead of trying to match it from all available repository on cluster.
-
-
diff --git a/docs/content/docs/guide/statuses.md b/docs/content/docs/guide/statuses.md
index 03264e8f..e6d854bc 100644
--- a/docs/content/docs/guide/statuses.md
+++ b/docs/content/docs/guide/statuses.md
@@ -89,5 +89,3 @@ The push pipeline of Pipelines as Code use this task, you can see the example
 here :
 
 [.tekton/push.yaml](https://github.com/openshift-pipelines/pipelines-as-code/blob/7b41cc3f769af40a84b7ead41c6f037637e95070/.tekton/push.yaml#L116)
-
-
diff --git a/docs/content/docs/install/bitbucket_cloud.md b/docs/content/docs/install/bitbucket_cloud.md
index e3971b0b..669ec0a7 100644
--- a/docs/content/docs/install/bitbucket_cloud.md
+++ b/docs/content/docs/install/bitbucket_cloud.md
@@ -53,10 +53,10 @@ recreate it.
 
 - You are now able to create a [`Repository CRD`](../../guide/repositorycrd/).
   The repository CRD will have:
-  
+
   - A **Username** (i.e: your Bitbucket username).
   - A reference to a kubernetes **Secret** containing the App Password as generated previously for Pipelines-as-Code operations.
-  
+
 - First create the secret with the app password in the `target-namespace`:
 
   ```shell
diff --git a/docs/content/docs/install/bitbucket_server.md b/docs/content/docs/install/bitbucket_server.md
index bbe7ca18..dd032b21 100644
--- a/docs/content/docs/install/bitbucket_server.md
+++ b/docs/content/docs/install/bitbucket_server.md
@@ -94,5 +94,7 @@ spec:
 * `tkn-pac create` and `bootstrap` is not supported on Bitbucket Server.
 
 {{< hint danger >}}
+
 * You can only reference user by the `ACCOUNT_ID` in owner file.
+
 {{< /hint >}}
diff --git a/docs/content/docs/install/github_apps.md b/docs/content/docs/install/github_apps.md
index 66068dfa..98dbf259 100644
--- a/docs/content/docs/install/github_apps.md
+++ b/docs/content/docs/install/github_apps.md
@@ -5,8 +5,6 @@ weight: 10
 
 # Create a Pipelines-as-Code GitHub App
 
-
-
 The GitHub App install is different than other install methods since it acts as
 the integration point with OpenShift Pipelines and brings the Git workflow into
 Tekton pipelines. You only need one GitHub App for every users on the cluster
diff --git a/docs/content/docs/install/installation.md b/docs/content/docs/install/installation.md
index 84e0f79f..d0a69324 100644
--- a/docs/content/docs/install/installation.md
+++ b/docs/content/docs/install/installation.md
@@ -1,31 +1,48 @@
 ---
-title: Infrastructure install
+title: Installation
 weight: 2
 ---
-# Manual install
+# Installation
 
-To install Pipelines as Code on your cluster you simply need to run this command
-:
+## Operator Install
+
+The easiest way to install Pipelines as Code on OpenShift is with the [Red Hat Openshift Pipelines Operator](https://docs.openshift.com/container-platform/latest/cicd/pipelines/installing-pipelines.html).
+
+On the Openshift Pipelines Operator the default namespace is `openshift-pipelines`.
+
+## Manual Install
+
+If you would like to do a manual installation of the stable release of Pipelines as Code
+on your OpenShift cluster you can apply the template with kubectl :
 
 ```shell
-VERSION=0.5.5
+# OpenShift
 kubectl apply -f https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code/stable/release.yaml
+
+# Kubernetes
+kubectl apply -f https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code/stable/release.k8s.yaml
 ```
 
 If you would like to install the current development version you can simply
 install it like this :
 
 ```shell
+# OpenShift
 kubectl apply -f https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code/nightly/release.yaml
+
+# Kubernetes
+kubectl apply -f https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code/nightly/release.k8s.yaml
 ```
 
-This will apply the `release.yaml` to your kubernetes cluster, creating the admin
+This will apply the `release.yaml` to your OpenShift cluster, creating the admin
 namespace `pipelines-as-code`, the roles and all other bits needed.
 
 The `pipelines-as-code` namespace is where the Pipelines-as-Code infrastructure
 runs and is supposed to be accessible only by the admins.
 
-The Route URL for the Pipelines as Code Controller is automatically created when
+### OpenShift
+
+On Openshift the Route URL for the Pipelines as Code Controller is automatically created when
 you apply the release.yaml. You will need to reference this url when configuring
 your github provider.
 
@@ -35,6 +52,10 @@ You can run this command to get the route created on your cluster:
 echo https://$(oc get route -n pipelines-as-code pipelines-as-code-controller -o jsonpath='{.spec.host}')
 ```
 
+### Kubernetes
+
+Kubernetes installation is a bit more involved head over [here](./kubernetes) for more details.
+
 ## RBAC
 
 Non `system:admin` users needs to be allowed explicitly to create repositories
diff --git a/docs/content/docs/install/kubernetes.md b/docs/content/docs/install/kubernetes.md
index 380f3945..4bf897ac 100644
--- a/docs/content/docs/install/kubernetes.md
+++ b/docs/content/docs/install/kubernetes.md
@@ -2,16 +2,20 @@
 title: Kubernetes
 weight: 20
 ---
-## Kubernetes
+# Kubernetes
+
+Pipelines as Code works on kubernetes/minikube/kind.
+
+## Prerequisites
+
+You will need to pre-install the [pipeline](https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml) `release.yaml`
+file on your kubernetes cluster.
+
+## Install
 
-Pipelines as Code should work directly on kubernetes/minikube/kind. You just need to install the release.yaml
-for [pipeline](https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml)
-, [triggers](https://storage.googleapis.com/tekton-releases/triggers/latest/release.yaml) and
-its [interceptors](https://storage.googleapis.com/tekton-releases/triggers/latest/interceptors.yaml) on your cluster.
 The release yaml to install pipelines are for the released version :
 
 ```shell
-VERSION=0.5.3
 kubectl apply -f https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code/stable/release.k8s.yaml
 ```
 
@@ -21,6 +25,37 @@ and for the nightly :
 kubectl apply -f https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code/nightly/release.k8s.yaml
 ```
 
+## Ingress
+
+You will need a `Ingress` to point to the pipelines-as-code controller, here is an example working with the [nginx ingress](https://kubernetes.github.io/ingress-nginx/) controller :
+
+```yaml
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  labels:
+    pipelines-as-code/route: controller
+  name: pipelines-as-code
+  namespace: pipelines-as-code
+spec:
+  ingressClassName: nginx
+  rules:
+  - host: webhook.host.tld
+    http:
+      paths:
+      - backend:
+          service:
+            name: pipelines-as-code-controller
+            port:
+              number: 8080
+        path: /
+        pathType: Prefix
+```
+
+In this example `webhook.host.tld` is the hostname for your pipelines controller to fill as the webhook url in the provider platform setup.
+
+## Tekton Dashboard integration
+
 If you have [Tekton Dashboard](https://github.com/tektoncd/dashboard). You can
 just add the key `tekton-dashboard-url` in the `pipelines-as-code` configmap
 set to the full url of the `Ingress` host to get tekton dashboard logs url.
diff --git a/docs/content/docs/install/overview.md b/docs/content/docs/install/overview.md
index 497f4f2c..2b3a52f8 100644
--- a/docs/content/docs/install/overview.md
+++ b/docs/content/docs/install/overview.md
@@ -17,10 +17,10 @@ The preferred method to use Pipelines-as-Code is configured with a GitHub Applic
 
 In order to get started with Pipelines-as-Code, you need to
 
-* Install Pipelines as Code. 
-    - If you run on OpenShift Pipelines (from 1.7.x) Pipelines as Code should be
+* Install Pipelines as Code.
+  * If you run on OpenShift Pipelines (from 1.7.x) Pipelines as Code should be
      automatically installed
-    - If you would like to do a manual install you can
+  * If you would like to do a manual install you can
       follow the [installation guide](installation.md).
 * Configure your Git Provider (eg: a GitHub Application) to access Pipelines as
   Code.
@@ -36,5 +36,3 @@ preferences the preferred install method is the Github Application method.
 * [Gitlab](./gitlab)
 * [Bitbucket Server](./bitbucket_server)
 * [Bitbucket Cloud](./bitbucket_cloud)
-
-
diff --git a/docs/content/docs/install/settings.md b/docs/content/docs/install/settings.md
index ac6b264c..b6a27e8c 100644
--- a/docs/content/docs/install/settings.md
+++ b/docs/content/docs/install/settings.md
@@ -42,4 +42,3 @@ the `pipelines-as-code` namespace.
   API. default to the [public hub](https://hub.tekton.dev/):
 
   <https://api.hub.tekton.dev/v1>
-
diff --git a/pkg/cmd/tknpac/generate/generate.go b/pkg/cmd/tknpac/generate/generate.go
index 31f503ef..443aefde 100644
--- a/pkg/cmd/tknpac/generate/generate.go
+++ b/pkg/cmd/tknpac/generate/generate.go
@@ -22,7 +22,7 @@ var (
 )
 
 type Opts struct {
-	Event   *info.Event
+	event   *info.Event
 	GitInfo *git.Info
 
 	IOStreams *cli.IOStreams
@@ -36,7 +36,7 @@ type Opts struct {
 
 func MakeOpts() *Opts {
 	return &Opts{
-		Event:   info.NewEvent(),
+		event:   info.NewEvent(),
 		GitInfo: &git.Info{},
 
 		IOStreams: &cli.IOStreams{},
@@ -66,11 +66,11 @@ func Command(ioStreams *cli.IOStreams) *cobra.Command {
 			"commandType": "main",
 		},
 	}
-	cmd.PersistentFlags().StringVar(&gopt.Event.BaseBranch, "branch", "",
+	cmd.PersistentFlags().StringVar(&gopt.event.BaseBranch, "branch", "",
 		"The target branch of the repository  event to handle (eg: main, nightly)")
-	cmd.PersistentFlags().StringVar(&gopt.Event.EventType, "event-type", "",
+	cmd.PersistentFlags().StringVar(&gopt.event.EventType, "event-type", "",
 		"The event type of the repository event to handle (eg: pull_request, push)")
-	cmd.PersistentFlags().StringVar(&gopt.Event.URL, "url", "",
+	cmd.PersistentFlags().StringVar(&gopt.event.URL, "url", "",
 		"The repository URL from where the event will come from")
 	cmd.PersistentFlags().StringVar(&gopt.pipelineRunName, "pipeline-name", "",
 		"The pipeline name")
@@ -100,7 +100,7 @@ func Generate(o *Opts) error {
 
 func (o *Opts) targetEvent() error {
 	var choice string
-	if o.Event.EventType != "" {
+	if o.event.EventType != "" {
 		return nil
 	}
 	msg := "Enter the Git event type for triggering the pipeline: "
@@ -124,7 +124,7 @@ func (o *Opts) targetEvent() error {
 
 	for k, v := range eventTypes {
 		if v == choice {
-			o.Event.EventType = k
+			o.event.EventType = k
 			return nil
 		}
 	}
@@ -135,15 +135,15 @@ func (o *Opts) targetEvent() error {
 func (o *Opts) branchOrTag() error {
 	var msg string
 	choice := new(string)
-	if o.Event.BaseBranch != "" {
+	if o.event.BaseBranch != "" {
 		return nil
 	}
 
-	o.Event.BaseBranch = mainBranch
+	o.event.BaseBranch = mainBranch
 
-	if o.Event.EventType == "pull_request" {
+	if o.event.EventType == "pull_request" {
 		msg = "Enter the target GIT branch for the Pull Request (default: %s): "
-	} else if o.Event.EventType == "push" {
+	} else if o.event.EventType == "push" {
 		msg = "Enter a target GIT branch or a tag for the push (default: %s)"
 	}
 
@@ -155,22 +155,11 @@ func (o *Opts) branchOrTag() error {
 	}
 
 	if *choice != "" {
-		o.Event.BaseBranch = *choice
+		o.event.BaseBranch = *choice
 	}
 	return nil
 }
 
-func generatefileName(eventType string) string {
-	var filename string
-	types := strings.Split(eventType, ",")
-	if len(types) > 1 {
-		filename = "pipelinerun"
-	} else {
-		filename = strings.ReplaceAll(eventType, "_", "-")
-	}
-	return fmt.Sprintf("%s.yaml", filename)
-}
-
 // samplePipeline will try to create a basic pipeline in tekton
 // directory.
 func (o *Opts) samplePipeline() error {
@@ -181,7 +170,7 @@ func (o *Opts) samplePipeline() error {
 		fpath = o.fileName
 		relpath = fpath
 	} else {
-		fname := generatefileName(o.Event.EventType)
+		fname := fmt.Sprintf("%s.yaml", strings.ReplaceAll(o.event.EventType, "_", "-"))
 		fpath = filepath.Join(o.GitInfo.TopLevelPath, ".tekton", fname)
 		relpath, _ = filepath.Rel(o.GitInfo.TopLevelPath, fpath)
 		if _, err := os.Stat(filepath.Join(o.GitInfo.TopLevelPath, ".tekton")); os.IsNotExist(err) {
diff --git a/pkg/cmd/tknpac/generate/template.go b/pkg/cmd/tknpac/generate/template.go
index 7242459f..27273546 100644
--- a/pkg/cmd/tknpac/generate/template.go
+++ b/pkg/cmd/tknpac/generate/template.go
@@ -172,14 +172,14 @@ func (o *Opts) genTmpl() (bytes.Buffer, error) {
 	t := template.Must(template.New("PipelineRun").Delims("<<", ">>").Parse(pipelineRunTmpl))
 	prName := fmt.Sprintf("%s-%s",
 		filepath.Base(o.GitInfo.URL),
-		strings.ReplaceAll(o.Event.EventType, "_", "-"))
+		strings.ReplaceAll(o.event.EventType, "_", "-"))
 	lang, err := o.detectLanguage()
 	if err != nil {
 		return bytes.Buffer{}, err
 	}
 	data := map[string]interface{}{
 		"prName":                  prName,
-		"event":                   o.Event,
+		"event":                   o.event,
 		"extra_task":              lang,
 		"language_specific_tasks": "",
 	}
diff --git a/pkg/cmd/tknpac/repository/create.go b/pkg/cmd/tknpac/repository/create.go
index 8f21e136..de025c8e 100644
--- a/pkg/cmd/tknpac/repository/create.go
+++ b/pkg/cmd/tknpac/repository/create.go
@@ -74,10 +74,6 @@ func CreateCommand(run *params.Run, ioStreams *cli.IOStreams) *cobra.Command {
 			gopt.IOStreams = createOpts.ioStreams
 			gopt.CLIOpts = createOpts.cliOpts
 
-			// defaulting the values for repo create command
-			gopt.Event.EventType = "[pull_request, push]"
-			gopt.Event.BaseBranch = "main"
-
 			return generate.Generate(gopt)
 		},
 		Annotations: map[string]string{
diff --git a/pkg/provider/bitbucketserver/bitbucketserver.go b/pkg/provider/bitbucketserver/bitbucketserver.go
index 3de321e0..cdc25a98 100644
--- a/pkg/provider/bitbucketserver/bitbucketserver.go
+++ b/pkg/provider/bitbucketserver/bitbucketserver.go
@@ -9,7 +9,6 @@ import (
 	"strings"
 
 	bbv1 "github.com/gfleury/go-bitbucket-v1"
-	"github.com/google/go-github/v43/github"
 	"github.com/mitchellh/mapstructure"
 	"github.com/openshift-pipelines/pipelines-as-code/pkg/params"
 	"github.com/openshift-pipelines/pipelines-as-code/pkg/params/info"
@@ -32,13 +31,13 @@ type Provider struct {
 }
 
 func (v *Provider) Validate(ctx context.Context, params *params.Run, event *info.Event) error {
-	signature := event.Request.Header.Get("X-Hub-Signature")
-	if event.Provider.WebhookSecret == "" && signature != "" {
-		return fmt.Errorf("bitbucket-server failed validaton: failed to find webhook secret")
-	}
-	return github.ValidateSignature(signature, event.Request.Payload, []byte(event.Provider.WebhookSecret))
+	return nil
 }
 
+// func (v *Provider) ParseEventType(request *http.Request, event *info.Event) error {
+//	panic("implement me")
+// }
+
 // sanitizeTitle make sure we only get the tile by remove everything after \n.
 func sanitizeTitle(s string) string {
 	return strings.Split(s, "\n")[0]
@@ -271,7 +270,7 @@ func (v *Provider) Detect(reqHeader *http.Header, payload string, logger *zap.Su
 		if provider.Valid(event, []string{"pr:from_ref_updated", "pr:opened"}) {
 			return setLoggerAndProceed()
 		}
-		if provider.Valid(event, []string{"pr:comment:added"}) {
+		if provider.Valid(event, []string{"pr:comment:added", "pr:comment:edited"}) {
 			if provider.IsRetestComment(e.Comment.Text) {
 				return setLoggerAndProceed()
 			}
diff --git a/pkg/provider/github/github.go b/pkg/provider/github/github.go
index 73f2ebfc..d13e4f98 100644
--- a/pkg/provider/github/github.go
+++ b/pkg/provider/github/github.go
@@ -243,7 +243,7 @@ func (v *Provider) Detect(reqHeader *http.Header, payload string, logger *zap.Su
 		return isGH, false, logger, nil
 
 	case *github.PullRequestEvent:
-		if provider.Valid(gitEvent.GetAction(), []string{"opened", "synchronize", "reopened"}) {
+		if provider.Valid(gitEvent.GetAction(), []string{"created", "synchronize", "opened"}) {
 			return setLoggerAndProceed()
 		}
 		return isGH, false, logger, nil
diff --git a/pkg/provider/gitlab/gitlab.go b/pkg/provider/gitlab/gitlab.go
index 6bb16b07..4944a1ab 100644
--- a/pkg/provider/gitlab/gitlab.go
+++ b/pkg/provider/gitlab/gitlab.go
@@ -80,10 +80,7 @@ func (v *Provider) Detect(reqHeader *http.Header, payload string, logger *zap.Su
 
 	switch gitEvent := eventInt.(type) {
 	case *gitlab.MergeEvent:
-		if provider.Valid(gitEvent.ObjectAttributes.Action, []string{"open", "update", "reopen"}) {
-			return setLoggerAndProceed()
-		}
-		return isGL, false, logger, nil
+		return setLoggerAndProceed()
 	case *gitlab.PushEvent:
 		return setLoggerAndProceed()
 	case *gitlab.MergeCommentEvent:


Test patch:
diff --git a/pkg/cmd/tknpac/generate/generate_test.go b/pkg/cmd/tknpac/generate/generate_test.go
index f245bc8f..f14e746e 100644
--- a/pkg/cmd/tknpac/generate/generate_test.go
+++ b/pkg/cmd/tknpac/generate/generate_test.go
@@ -130,7 +130,7 @@ func TestGetRepoURL(t *testing.T) {
 			}
 
 			err := Generate(&Opts{
-				Event:     &tt.event,
+				event:     &tt.event,
 				GitInfo:   &tt.gitinfo,
 				IOStreams: io,
 				CLIOpts:   &cli.PacCliOpts{},
diff --git a/pkg/provider/bitbucketserver/bitbucketserver_test.go b/pkg/provider/bitbucketserver/bitbucketserver_test.go
index 1c3e95f4..a1975a35 100644
--- a/pkg/provider/bitbucketserver/bitbucketserver_test.go
+++ b/pkg/provider/bitbucketserver/bitbucketserver_test.go
@@ -1,16 +1,7 @@
 package bitbucketserver
 
 import (
-	"context"
-	"crypto/hmac"
-
-	//nolint
-	"crypto/sha1"
-	"crypto/sha256"
-	"encoding/hex"
 	"encoding/json"
-	"fmt"
-	"hash"
 	"net/http"
 	"path/filepath"
 	"strings"
@@ -449,69 +440,3 @@ func getLogger() *zap.SugaredLogger {
 	logger := zap.New(observer).Sugar()
 	return logger
 }
-
-func TestValidate(t *testing.T) {
-	tests := []struct {
-		name         string
-		wantErr      bool
-		secret       string
-		payload      string
-		hashFunc     func() hash.Hash
-		prefixheader string
-	}{
-		{
-			name:         "secret missing",
-			secret:       "",
-			payload:      `{"hello": "moto"}`,
-			hashFunc:     sha256.New,
-			prefixheader: "sha256",
-			wantErr:      true,
-		},
-		{
-			name:         "good/SHA256Signature",
-			secret:       "secrete",
-			payload:      `{"hello": "moto"}`,
-			hashFunc:     sha256.New,
-			prefixheader: "sha256",
-		},
-		{
-			name:         "good/SHA1Signature",
-			secret:       "secrete",
-			payload:      `{"ola": "amigo"}`,
-			hashFunc:     sha1.New,
-			prefixheader: "sha1",
-		},
-		{
-			name:         "bad/signature",
-			payload:      `{"ciao": "ragazzo"}`,
-			hashFunc:     sha256.New,
-			prefixheader: "sha1",
-			wantErr:      true,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			v := &Provider{}
-
-			hmac := hmac.New(tt.hashFunc, []byte(tt.secret))
-			hmac.Write([]byte(tt.payload))
-			signature := hex.EncodeToString(hmac.Sum(nil))
-
-			httpHeader := http.Header{}
-			httpHeader.Add("X-Hub-Signature", fmt.Sprintf("%s=%s", tt.prefixheader, signature))
-
-			event := info.NewEvent()
-			event.Request = &info.Request{
-				Header:  httpHeader,
-				Payload: []byte(tt.payload),
-			}
-			event.Provider = &info.Provider{
-				WebhookSecret: tt.secret,
-			}
-
-			if err := v.Validate(context.TODO(), nil, event); (err != nil) != tt.wantErr {
-				t.Errorf("Validate() error = %v, wantErr %v", err, tt.wantErr)
-			}
-		})
-	}
-}
diff --git a/pkg/provider/github/github_test.go b/pkg/provider/github/github_test.go
index f5471f69..5ede8b01 100644
--- a/pkg/provider/github/github_test.go
+++ b/pkg/provider/github/github_test.go
@@ -678,7 +678,7 @@ func TestProvider_Detect(t *testing.T) {
 		{
 			name: "pull request event",
 			event: github.PullRequestEvent{
-				Action: github.String("opened"),
+				Action: github.String("created"),
 			},
 			eventType:  "pull_request",
 			isGH:       true,
diff --git a/pkg/provider/gitlab/test/test.go b/pkg/provider/gitlab/test/test.go
index 811ae279..1fbe7ff4 100644
--- a/pkg/provider/gitlab/test/test.go
+++ b/pkg/provider/gitlab/test/test.go
@@ -181,7 +181,6 @@ func (t TEvent) MREventAsJSON() string {
         "default_branch": "%s"
     },
     "object_attributes": {
-		"action": "open",
         "iid": %d,
         "source_project_id": %d,
         "title": "%s",