Skip to content

Commit

Permalink
Merge pull request #12274 from 0xc0170/add_mergify
Browse files Browse the repository at this point in the history
mergify: enable for any pull request
  • Loading branch information
adbridge authored Jan 20, 2020
2 parents 9c6cdbf + c2b65fd commit a81f016
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pull_request_rules:
# From needs: review to needs: work - reviewers request
- name: "label needs: work when changes were requested"
conditions:
- base~=feature-mergify
# Reviewers
- "#changes-requested-reviews-by>0"
actions:
Expand All @@ -36,11 +35,11 @@ pull_request_rules:
- "needs: work"
remove:
- "needs: review"
- "needs: CI"

# From needs: review to needs: work - CI failure
- name: "label needs: work when travis-ci failed"
conditions:
- base~=feature-mergify
# Travis failing
- status-failure~=continuous-integration/travis-ci/pr
actions:
Expand All @@ -49,11 +48,11 @@ pull_request_rules:
- "needs: work"
remove:
- "needs: review"
- "needs: CI"

# From needs: review to needs: work - CI failure
- name: "label needs: work when Jenkins CI failed - pr head"
conditions:
- base~=feature-mergify
# Jenkins CI failing
- status-failure~=continuous-integration/jenkins/pr-head
actions:
Expand All @@ -62,11 +61,11 @@ pull_request_rules:
- "needs: work"
remove:
- "needs: review"
- "needs: CI"

# From needs: review to needs: work - CI failure
- name: "label needs: work when Jenkins CI failed - any of the pipeline"
conditions:
- base~=feature-mergify
# Jenkins CI failing - any of the pipeline
- status-failure~=^jenkins-ci
actions:
Expand All @@ -75,11 +74,11 @@ pull_request_rules:
- "needs: work"
remove:
- "needs: review"
- "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"
conditions:
- base~=feature-mergify
# Labels
- "label!=needs: preceding PR"

Expand All @@ -100,10 +99,18 @@ pull_request_rules:
- "needs: review"
- "needs: work"

# Remove reviews after the branch is updated. This yet does not allow
# any other action like labels, etc. See mergify-engine/issues/360
- name: remove outdated reviews
conditions: []
actions:
dismiss_reviews:
approved: True
changes_requested: True

# Conflict in the PR - needs: work and a comment to notify a user
- name: "label needs: work when there is a conflict"
conditions:
- base~=feature-mergify
- conflict
actions:
label:
Expand All @@ -117,7 +124,6 @@ pull_request_rules:

- name: "add label feature branch for feature branch additions"
conditions:
- base~=feature-mergify
- base~=^feature
actions:
label:
Expand All @@ -127,7 +133,6 @@ pull_request_rules:
# Ready for integration. Not yet auto merge, will be enabled once carefuly tested
- name: label "ready for merge" when ready
conditions:
- base~=feature-mergify
# Labels
- "label!=do not merge"
- "label=needs: CI"
Expand All @@ -152,7 +157,6 @@ pull_request_rules:
# Clean-up after merge
- name: remove ready for merge when merged
conditions:
- base~=feature-mergify
- merged
- "label=ready for merge"
actions:
Expand All @@ -162,7 +166,6 @@ pull_request_rules:

- name: add "do not merge" label when WIP is in title
conditions:
- base~=feature-mergify
- title~=^(\[wip\]( |:) |\[WIP\]( |:) |wip( |:) |WIP( |:)).*
actions:
label:
Expand All @@ -172,7 +175,6 @@ pull_request_rules:
# Check if version label is applied
- name: release version is a must for merged PRs
conditions:
- base~=feature-mergify
- merged
- -label~=^(release-version)
actions:
Expand Down

0 comments on commit a81f016

Please sign in to comment.