Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(mergify): upgrade configuration to current format #2237

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
queue_rules:
- name: default
conditions:
queue_conditions:
- check-success=buildkite/elastic-package
- check-success=CLA
- base=main
- author~=^dependabot(|-preview)\[bot\]$
merge_conditions:
- check-success=buildkite/elastic-package
merge_method: squash

pull_request_rules:
- name: automatic approval for Dependabot pull requests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, is the condition of this rule needed now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the automatic approval for Dependabot pull requests pull request rule?
That rule does not have any condition.

The other pull request rule (automatic merge of bot 🤖) has no conditions (empty array), so probably it could be removed the conditions entry. I could push a commit deleting that entry.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the automatic approval for Dependabot pull requests pull request rule?
That rule does not have any condition.

Yes, I refer to this one.

It has this condition, right?

    conditions:
      - author~=^dependabot(|-preview)\[bot\]$

Is it needed? Or why was it removed from the other rule and not from here? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok! I didn't see it because Github didn't show it (it was collapsed) 😅

What I understand is that from the other rule it is removed because it uses as an action to enqueue the PR (and it uses the conditions defined in the queue). In this rule, there is no action to enqueue the PR. This is just to approve the PR.

What I'm wondering now if it is required to add as part of the queue_conditions this #approved-reviews-by one (docs), but it's true that before there was no such a rule:

    queue_conditions:
      - check-success=buildkite/elastic-package
      - check-success=CLA
      - base=main
      - author~=^dependabot(|-preview)\[bot\]$
      - "#approved-reviews-by >= 1"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I understand is that from the other rule it is removed because it uses as an action to enqueue the PR (and it uses the conditions defined in the queue). In this rule, there is no action to enqueue the PR. This is just to approve the PR.

Ah ok, this is what I was not understanding.

What I'm wondering now if it is required to add as part of the queue_conditions this #approved-reviews-by one (docs)

I guess we are checking this with the branch protection rules?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we are checking this with the branch protection rules?
Yes, I think so, that rule is there.

Expand All @@ -12,12 +18,7 @@ pull_request_rules:
type: APPROVE
message: Automatically approving dependabot
- name: automatic merge of bot 🤖
conditions:
- check-success=buildkite/elastic-package
- check-success=CLA
- base=main
- author~=^dependabot(|-preview)\[bot\]$
conditions: []
actions:
queue:
method: squash
name: default