Skip to content

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

Open
mergify[bot] wants to merge 1 commit intomainfrom
mergify/configuration-deprecated-update
Open

ci(mergify): upgrade configuration to current format#314
mergify[bot] wants to merge 1 commit intomainfrom
mergify/configuration-deprecated-update

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Mar 31, 2026

Hey there! 👋

We've noticed that your Mergify configuration is using some deprecated fields.

No worries—we've got your back! This automated PR updates your config to align with the newest standards, ensuring everything keeps running smoothly.

Do not procrastinate! You must upgrade your configuration before 2026-07-31, otherwise your configuration will stop working.

What's Changed?

Why This Matters

Keeping your configuration up-to-date means you'll benefit from the latest features and improvements Mergify has to offer. Plus, it helps prevent any unexpected hiccups down the road.

Got Questions? We've Got Answers! 🙌

Is this update safe to merge?

Absolutely! We've made sure the changes are compatible with your current setup. Your workflows should continue to work just as before—if not better!

Do I need to do anything special after merging?

Nope! Just merge this PR, and you're all set. If you have any custom configurations, it's a good idea to give them a quick look to ensure everything's in order.

What if I run into issues or have concerns?

We're here to help! Feel free to reach out to our support team anytime.

Thanks for being awesome and keeping your configuration up-to-date! If you have any thoughts or need a hand, don't hesitate to let us know.

Happy merging! 🎉

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Mar 31, 2026

Reviewer's Guide

Updates the Mergify configuration to the current list-based pull_request_rules format and removes the deprecated delete_head_branch action, preserving existing rule semantics and labels while restructuring YAML nesting/indentation.

Flow diagram for Mergify pull_request_rules evaluation after migration to list format

flowchart TD
  start(["PR_updated (status_checks/reviews/files)"])
  load["Load pull_request_rules (YAML list)"]

  rule_auto_merge{Auto-merge conditions satisfied?}
  rule_label_cicd{CI/CD related files changed?}
  rule_label_docs{Top-level .md files changed?}
  rule_label_testing{Tests_or_tox_changed?}
  rule_needs_rebase_add{Conflict_and_not_closed?}
  rule_needs_rebase_remove{No_conflict_and_not_closed?}
  rule_release_branch{Base_branch_matches_release-?}
  rule_ci_failure_add{Any_check_failure > 0?}
  rule_ci_failure_remove{Any_check_failure = 0?}
  rule_one_approval_add{Approved_reviews_by = 1?}
  rule_one_approval_remove{Approved_reviews_by != 1?}
  rule_dependencies{requirements_files_changed?}

  action_merge["Action: merge (method=merge)"]
  action_label_cicd["Action: add label CI/CD"]
  action_label_docs["Action: add label documentation"]
  action_label_testing["Action: add label testing"]
  action_label_needs_rebase_add["Action: add label needs-rebase and comment"]
  action_label_needs_rebase_remove["Action: remove label needs-rebase"]
  action_label_release_branch["Action: add label release-branch"]
  action_label_ci_failure_add["Action: add label ci-failure"]
  action_label_ci_failure_remove["Action: remove label ci-failure"]
  action_label_one_approval_add["Action: add label one-approval"]
  action_label_one_approval_remove["Action: remove label one-approval"]
  action_label_dependencies["Action: add label dependencies"]

  end_state(["PR state updated in GitHub"])

  start --> load

  load --> rule_auto_merge
  rule_auto_merge -- Yes --> action_merge
  rule_auto_merge -- No --> rule_label_cicd

  rule_label_cicd -- Yes --> action_label_cicd
  rule_label_cicd -- No --> rule_label_docs

  rule_label_docs -- Yes --> action_label_docs
  rule_label_docs -- No --> rule_label_testing

  rule_label_testing -- Yes --> action_label_testing
  rule_label_testing -- No --> rule_needs_rebase_add

  rule_needs_rebase_add -- Yes --> action_label_needs_rebase_add
  rule_needs_rebase_add -- No --> rule_needs_rebase_remove

  rule_needs_rebase_remove -- Yes --> action_label_needs_rebase_remove
  rule_needs_rebase_remove -- No --> rule_release_branch

  rule_release_branch -- Yes --> action_label_release_branch
  rule_release_branch -- No --> rule_ci_failure_add

  rule_ci_failure_add -- Yes --> action_label_ci_failure_add
  rule_ci_failure_add -- No --> rule_ci_failure_remove

  rule_ci_failure_remove -- Yes --> action_label_ci_failure_remove
  rule_ci_failure_remove -- No --> rule_one_approval_add

  rule_one_approval_add -- Yes --> action_label_one_approval_add
  rule_one_approval_add -- No --> rule_one_approval_remove

  rule_one_approval_remove -- Yes --> action_label_one_approval_remove
  rule_one_approval_remove -- No --> rule_dependencies

  rule_dependencies -- Yes --> action_label_dependencies
  rule_dependencies -- No --> end_state

  action_merge --> end_state
  action_label_cicd --> end_state
  action_label_docs --> end_state
  action_label_testing --> end_state
  action_label_needs_rebase_add --> end_state
  action_label_needs_rebase_remove --> end_state
  action_label_release_branch --> end_state
  action_label_ci_failure_add --> end_state
  action_label_ci_failure_remove --> end_state
  action_label_one_approval_add --> end_state
  action_label_one_approval_remove --> end_state
  action_label_dependencies --> end_state
Loading

File-Level Changes

Change Details Files
Migrate pull_request_rules to the modern list-based YAML structure while preserving all rule logic and conditions.
  • Wrap existing rules under pull_request_rules as a proper YAML list (each rule now prefixed with a dash and indented accordingly).
  • Re-indent nested conditions (or/and blocks, files and check-* conditions) to match current Mergify schema expectations without altering their logical expressions.
  • Keep all existing rule names, descriptions, and conditions (auto-merge, label-* rules, needs-rebase handling, release-branch, ci-failure, one-approval, dependencies) functionally identical.
.github/mergify.yml
Remove use of deprecated delete_head_branch action in favor of GitHub’s native automatic branch deletion.
  • Delete the delete_head_branch action from the auto-merge rule’s actions block.
  • Leave the merge action configuration unchanged so automatic merges continue to work as before.
.github/mergify.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@mergify mergify bot added CI/CD Affects CI/CD configuration ci-failure labels Mar 31, 2026
Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@mergify mergify bot force-pushed the mergify/configuration-deprecated-update branch from 4153711 to dede688 Compare March 31, 2026 07:25
@mergify mergify bot added ci-failure and removed ci-failure labels Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Affects CI/CD configuration ci-failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants