Skip to content

Commit

Permalink
mergify: fix needs work labels
Browse files Browse the repository at this point in the history
We have clash with needs work and needs CI labels. If CI fails, we need to be in CI stage. Check for needs: CI label and apply work only if it was CI.

Otherwise we would be in the loop.
  • Loading branch information
0xc0170 committed Oct 14, 2021
1 parent e4111ea commit d4c27e0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,36 @@ pull_request_rules:
- check-failure=cmake-checks
- check-failure=frozen-tools-check
- "label!=mergify skip"
- "label!='needs: work'"
actions:
label:
add: ['needs: work']
remove: ['needs: review', 'needs: CI']

# From needs: review to needs: work - CI failure
# From needs: CI to needs: work - CI failure in jenkins pipeline
- name: "label needs: work when Jenkins CI failed - pr head"
conditions:
# Jenkins CI failing
# Jenkins CI failing, only pr head
- check-failure~=continuous-integration/jenkins/pr-head
- "label!=mergify skip"
- "label=needs: CI"
- -closed
actions:
label:
add: ['needs: work']
remove: ['needs: review','needs: CI']
remove: ['needs: CI']

# From needs: review to needs: work - CI failure
# From needs: CI to needs: work - CI failure
- name: "label needs: work when Jenkins CI failed - any of the pipeline"
conditions:
# Jenkins CI failing - any of the pipeline
- check-failure~=^jenkins-ci
- "label=needs: CI"
- "label!=mergify skip"
actions:
label:
add: ['needs: work']
remove: ['needs: review', 'needs: CI']
remove: ['needs: CI']

# From needs: review or needs: work to needs: CI. One approval means we should be good to start CI
- name: "label needs: CI when at least one reviewers approval"
Expand Down

0 comments on commit d4c27e0

Please sign in to comment.