mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 11:50:18 +00:00
ci: detect [skip ci]
in PR descriptions and prevent breakage
When Jenkins jobs are started by a comment, and if the PR contains `[skip ci]` in the description, Jenkins does not run the requested job, nor set a status for the job in the PR. This causes Mergify to add the `ok-to-test` label again, instructing a GitHub Action to add comments to start jobs in Jenkins. Once all comments have been posted, the `ok-to-test` label is removed. Mergify then notices that the jobs were not run, and adds the `ok-to-test` label again.... Endlessly looping of adding the label, commenting and removing the label as a result. By reporting the brokenness of the PR description and marking the PR as Draft, the looping is prevented. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
dabf3c4099
commit
4a46ffd2b7
14
.mergify.yml
14
.mergify.yml
@ -464,3 +464,17 @@ pull_request_rules:
|
||||
- Repo activity
|
||||
- ci/skip/e2e
|
||||
- ci/skip/multi-arch-build
|
||||
|
||||
# A [skip ci] in the PR description prevents Jenkins jobs from running, mark
|
||||
# the PR as Draft so that CI jobs do not automatically run anymore.
|
||||
- name: detect [skip ci] in the PR description
|
||||
conditions:
|
||||
- "body-raw~=[skip ci]"
|
||||
actions:
|
||||
edit:
|
||||
draft: true
|
||||
comment:
|
||||
# yamllint disable-line rule:truthy
|
||||
message: "The PR description contains the unsupported `[skip ci]`
|
||||
command, please update the description and mark the PR ready for review
|
||||
again."
|
||||
|
Loading…
Reference in New Issue
Block a user