Skip to content

Commit 811cf7c

Browse files
chmouelsavitaashture
authored andcommitted
Add tech preview shortcode
And make the matching body payload a tech preview. Explains why the behaviour may be erratics on the matching body payload with the gitops comments. Signed-off-by: Chmouel Boudjnah <[email protected]>
1 parent 2217f5d commit 811cf7c

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

docs/content/docs/guide/authoringprs.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ commit title on `push`
196196

197197
### Matching PipelineRun on body payload
198198

199+
{{< tech_preview "Matching PipelineRun on body payload" >}}
200+
199201
The payload body as passed by the Git provider is available in the CEL
200202
variable as `body` and you can use this expression to do any filtering on
201203
anything the Git provider is sending over:
@@ -213,6 +215,31 @@ will only match if the pull request is targeting the `main` branch, the author
213215
of the pull request is called `superuser` and the action is `synchronize` (ie:
214216
an update occurred on a pull request)
215217

218+
{{< hint info >}}
219+
When matching the body payload in a Pull Request, the GitOps comments such as
220+
`/retest` won't be working as expected.
221+
222+
The payload body will become of the comment and not the original pull request
223+
payload.
224+
225+
Consequently, when a pull request event occurs, like opening or updating a pull
226+
request, the CEL body payload may not align with the defined specifications.
227+
228+
To be able to retest your Pull Request when using a CEL on bod payload,
229+
you can make a dummy update to the Pull Request by sending a new SHA with this
230+
git command:
231+
232+
```bash
233+
# assuming you are on the branch you want to retest
234+
# and the upstream remote are set
235+
git commit --amend --no-edit && \
236+
git push --force-with-lease
237+
```
238+
239+
or close/open the pull request.
240+
241+
{{< /hint >}}
242+
216243
### Matching PipelineRun on request header
217244

218245
You can do some further filtering on the headers as passed by the Git provider
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<blockquote class="book-hint danger">
2+
<b>{{ .Get 0 }}</b> is a <b>Technology Preview</b> feature only. Technology Preview features
3+
are not currently supported and might not be functionally complete. We do
4+
not recommend using them in production. These features provide early access
5+
to an upcoming Pipelines-as-Code features, enabling you to test functionality
6+
and provide feedback during the development process.
7+
</blockquote>
8+

0 commit comments

Comments
 (0)