Skip to content

ci(mergify): remove the delete_head_branch action - #316

Open
mergify[bot] wants to merge 1 commit into
mainfrom
mergify/configuration-deprecated-update/delete_head_branch_action_removal
Open

mergify[bot] wants to merge 1 commit into
mainfrom
mergify/configuration-deprecated-update/delete_head_branch_action_removal

Conversation

@mergify

@mergify mergify Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Your .github/mergify.yml uses syntax that Mergify is retiring. This pull request updates it for you: Remove the delete_head_branch action.

Why now: the old syntax is past its end date, 2026-07-31. Mergify still accepts it for now.

Is it safe to merge?

🟠 Yes, once you know what changes, hence the behavior-change label. Mergify stops deleting a pull request's branch once it merges. GitHub's Automatically delete head branches setting does the same job, but a pull request closed without merging keeps its branch.

Before you merge: turn on Automatically delete head branches under Settings → General → Pull Requests, if it isn't on already.

More about this pull request
  • Mergify rebuilds this branch from your default branch when it needs to, so commits pushed to it are lost. Make your own changes in a separate pull request.
  • If you close this pull request, Mergify won't open it again. The old syntax is past its end date: once Mergify stops accepting it, it rejects your configuration and runs none of your rules until you make this change yourself.
  • Questions? Write to support@mergify.com.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0d4f873a-134b-4181-b778-4c9070f3d7aa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sourcery-ai

sourcery-ai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Remove Mergify’s delete_head_branch action so the configuration no longer uses the retiring syntax.

  • .github/mergify.yml L78 (removed lines)

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 the CI/CD Affects CI/CD configuration label Nov 20, 2026
@mergify

mergify Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

@mergify mergify Bot added the ci-failure label Nov 20, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/mergify.yml" line_range="78" />
<code_context>
   actions:
     merge:
       method: merge
-    delete_head_branch:

 - name: label-cicd
</code_context>
<issue_to_address>
**Merged branches accumulate**

When gitHub’s “Automatically delete head branches” setting is disabled, the removed `delete_head_branch` action no longer deletes merged head branches, so GitHub leaves them behind for manual cleanup.

Restore the `delete_head_branch` action.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and merged head branches will remain instead of being deleted automatically. Reverting restores the automation for future merges, but branches left behind would need to be cleaned up separately.

Blocking findings: .github/mergify.yml:78


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread .github/mergify.yml
actions:
merge:
method: merge
delete_head_branch:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Merged branches accumulate

When gitHub’s “Automatically delete head branches” setting is disabled, the removed delete_head_branch action no longer deletes merged head branches, so GitHub leaves them behind for manual cleanup.

Restore the delete_head_branch action.

Prompt for AI agents
In `.github/mergify.yml` at line 78:

**Merged branches accumulate**

When gitHub’s “Automatically delete head branches” setting is disabled, the removed `delete_head_branch` action no longer deletes merged head branches, so GitHub leaves them behind for manual cleanup.

Restore the `delete_head_branch` action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants