diff --git a/.mergify.yml b/.mergify.yml index 1ad95ec6f1b..a22e3e85bc2 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -2,7 +2,8 @@ queue_rules: - name: default merge_method: squash conditions: - - check-success=fleet-ci/pr-merge + - check-success=buildkite/elastic-agent + - check-success=CLA pull_request_rules: - name: self-assign PRs conditions: @@ -48,7 +49,6 @@ pull_request_rules: - -merged - -closed - conflict - - author=apmmachine - label=automation actions: close: @@ -61,16 +61,14 @@ pull_request_rules: - merged - closed - and: - - label=automation - - head~=^update-go-version + - head~=^updatecli.* - files~=^\.go-version$ actions: delete_head_branch: - name: automatic approval for mergify pull requests with changes in bump-rules conditions: - author=mergify[bot] - - check-success=fleet-ci/pr-merge - - label=automation + - check-success=buildkite/elastic-agent - files~=^\.mergify\.yml$ - head~=^add-backport-next.* actions: @@ -79,21 +77,28 @@ pull_request_rules: message: Automatically approving mergify - name: automatic squash and merge with success checks and the files matching the regex ^.mergify.yml is modified. conditions: - - check-success=fleet-ci/pr-merge - - label=automation + - check-success=buildkite/elastic-agent - files~=^\.mergify\.yml$ - head~=^add-backport-next.* - "#approved-reviews-by>=1" actions: queue: name: default + - name: delete upstream branch for mergify backports + conditions: + - or: + - merged + - closed + - and: + - head~=^mergify/bp/.* + actions: + delete_head_branch: - name: delete upstream branch with changes on ^.mergify.yml that has been merged or closed conditions: - or: - merged - closed - and: - - label=automation - head~=^add-backport-next.* - files~=^\.mergify\.yml$ actions: