@@ -114,12 +114,12 @@ entire suite of checks once again.
114114
115115
116116
117- # ## Gitops command on pull or merge request
117+ # ## GitOps command on pull or merge request
118118
119- If you are targeting a pull or merge request you can use `GitOps` comment
119+ If you are targeting a push, pull or merge request you can use `GitOps` comment
120120inside your pull request, to restart all or specific Pipelines.
121121
122- For example you want to restart all your pipeline you can add a comment starting
122+ For example, you want to restart all your pipeline you can add a comment starting
123123with `/retest` and all PipelineRun attached to that pull or merge request will be
124124restarted :
125125
@@ -141,6 +141,58 @@ roses are red, violets are blue. pipeline are bound to flake by design.
141141/test <pipelinerun-name>
142142` ` `
143143
144+ # ## GitOps command on push request
145+
146+ To trigger GitOps commands in response to a push request, you can include `GitOps`
147+ comments within your commit messages. These comments can be used to restart
148+ either all pipelines or specific ones. Here's how it works :
149+
150+ For restarting all pipeline runs :
151+
152+ 1. Use `/retest` or `/test` within your commit message.
153+
154+ For restarting a specific pipeline run :
155+ 2. Use `/retest <pipelinerun-name>` or `/test <pipelinerun-name>` within your
156+ commit message. Replace `<pipelinerun-name>` with the specific name of the
157+ pipeline run you want to restart.
158+
159+ **Note:**
160+
161+ When executing `GitOps` commands on a commit that exists in multiple branches
162+ within a push request, the branch with the latest commit will be used.
163+
164+ This means :
165+
166+ 1. If a user specifies commands like `/retest` or `/test` without any argument
167+ in a comment on a branch, the test will automatically be performed on the **main** branch.
168+
169+ Examples :
170+ 1. `/retest`
171+ 2. `/test`
172+ 3. `/retest <pipelinerun-name>`
173+ 4. `/test <pipelinerun-name>`
174+
175+ 2. If the user includes a branch specification such as `/retest branch:test` or
176+ ` /test branch:test` , the test will be executed on the commit where the comment is
177+ located, with the context of the **test** branch.
178+
179+ Examples :
180+ 1. `/retest branch:test`
181+ 2. `/test branch:test`
182+ 3. `/retest <pipelinerun-name> branch:test`
183+ 4. `/test <pipelinerun-name> branch:test`
184+
185+ To add `GitOps` comments to a push request, follow these steps :
186+
187+ 1. Go to your repository.
188+ 2. Click on the **Commits** section.
189+ 3. Choose one of the individual **Commit**.
190+ 4. Click on the line number where you want to add a `GitOps` comment, as shown in the image below :
191+
192+ 
193+
194+ Please note that this feature is supported for the GitHub provider only.
195+
144196# # Cancelling the PipelineRun
145197
146198You can cancel a running PipelineRun by commenting on the PullRequest.
@@ -159,7 +211,7 @@ It seems the infra is down, so cancelling the pipelineruns.
159211If you have multiple `PipelineRun` and you want to target a specific
160212` PipelineRun` you can use the `/cancel` comment with the PipelineRun name
161213
162- Example :
214+ Example :
163215
164216` ` ` text
165217roses are red, violets are blue. why to run the pipeline when the infra is down.
@@ -170,3 +222,41 @@ roses are red, violets are blue. why to run the pipeline when the infra is down.
170222On GitHub App the status of the Pipeline will be set to `cancelled`.
171223
172224
225+
226+ # ## Cancelling the PipelineRun on push request
227+
228+ You can cancel a running PipelineRun by commenting on the commit.
229+ Here's how you can do it.
230+
231+ Example :
232+
233+ 1. Use `/cancel` to cancel all PipeineRuns.
234+ 2. Use `/cancel <pipelinerun-name>` to cancel a specific PipeineRun
235+
236+ **Note:**
237+
238+ When executing `GitOps` comments on a commit that exists in multiple branches
239+ within a push request, the branch with the latest commit will be used.
240+
241+ This means :
242+
243+ 1. If a user specifies commands like `/cancel`
244+ without any argument in a comment on a branch,
245+ it will automatically target the **main** branch.
246+
247+ Examples :
248+ 1. `/cancel`
249+ 2. `/cancel <pipelinerun-name>`
250+
251+ 2. If the user issues a command like `/cancel branch:test`,
252+ it will target the commit where the comment was made but use the **test** branch.
253+
254+ Examples :
255+ 1. `/cancel branch:test`
256+ 2. `/cancel <pipelinerun-name> branch:test`
257+
258+ In the GitHub App, the status of the Pipeline will be set to `cancelled`.
259+
260+ 
261+
262+ Please note that this feature is supported for the GitHub provider only.
0 commit comments