Skip to content

Commit bd7e639

Browse files
PuneetPunamiyachmouel
authored andcommitted
fix: Pipelinerun name format in incoming webhook docs
The previous documentation provided an invalid PipelineRun name format. Hence, this patch corrects the name format to ensure compliance with RFC 1123, which requires lowercase alphanumeric characters, hyphens, or dots, and mandates the name to start and end with an alphanumeric character. Signed-off-by: PuneetPunamiya <[email protected]>
1 parent 6974ba9 commit bd7e639

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/content/docs/guide/incoming_webhook.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ A PipelineRun is then annotated to target the incoming event and the main branch
6565
apiVersion: tekton.dev/v1
6666
kind: PipelineRun
6767
metadata:
68-
name: target_pipelinerun
68+
name: target-pipelinerun
6969
annotations:
7070
pipelinesascode.tekton.dev/on-event: "[incoming]"
7171
pipelinesascode.tekton.dev/on-target-branch: "[main]"
@@ -95,7 +95,7 @@ You can use the `generateName` field as the PipelineRun name but you will need t
9595
As an example here is a curl snippet starting the PipelineRun:
9696

9797
```shell
98-
curl -X POST 'https://control.pac.url/incoming?secret=very-secure-shared-secret&repository=repo&branch=main&pipelinerun=target_pipelinerun'
98+
curl -X POST 'https://control.pac.url/incoming?secret=very-secure-shared-secret&repository=repo&branch=main&pipelinerun=target-pipelinerun'
9999
```
100100

101101
in this snippet, note two things the `"/incoming"` path to the controller URL
@@ -144,7 +144,7 @@ spec:
144144
and here is a curl snippet passing the `pull_request_number` value:
145145

146146
```shell
147-
curl -H "Content-Type: application/json" -X POST "https://control.pac.url/incoming?repository=repo&branch=main&secret=very-secure-shared-secret&pipelinerun=target_pipelinerun" -d '{"params": {"pull_request_number": "12345"}}'
147+
curl -H "Content-Type: application/json" -X POST "https://control.pac.url/incoming?repository=repo&branch=main&secret=very-secure-shared-secret&pipelinerun=target-pipelinerun" -d '{"params": {"pull_request_number": "12345"}}'
148148
```
149149

150150
The parameter value of `pull_request_number` will be set to `12345` when using the variable `{{pull_request_number}}` in your PipelineRun.
@@ -156,7 +156,7 @@ specify the `X-GitHub-Enterprise-Host` header when making the incoming webhook
156156
request. For example when using curl:
157157

158158
```shell
159-
curl -H "X-GitHub-Enterprise-Host: github.example.com" -X POST "https://control.pac.url/incoming?repository=repo&branch=main&secret=very-secure-shared-secret&pipelinerun=target_pipelinerun"
159+
curl -H "X-GitHub-Enterprise-Host: github.example.com" -X POST "https://control.pac.url/incoming?repository=repo&branch=main&secret=very-secure-shared-secret&pipelinerun=target-pipelinerun"
160160
```
161161

162162
### Using incoming webhook with webhook based providers

0 commit comments

Comments
 (0)