Skip to content

feat(stack): add mergify stack drop command#1383

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/jd/feat/stack-drop/add-mergify-stack-drop-cmd--27bd94a9
May 11, 2026
Merged

feat(stack): add mergify stack drop command#1383
mergify[bot] merged 1 commit into
mainfrom
devs/jd/feat/stack-drop/add-mergify-stack-drop-cmd--27bd94a9

Conversation

@jd
Copy link
Copy Markdown
Member

@jd jd commented May 7, 2026

Add "mergify stack drop COMMIT..." which removes one or more commits
from the stack in a single non-interactive rebase, replacing the
brittle "GIT_SEQUENCE_EDITOR='sed -i ... pick → drop' git rebase -i"
recipe agents tend to reach for.

Multiple commits can be listed (matched by SHA or Change-Id prefix);
unlike fixup, dropping the first commit in the stack is fine. Errors
on unknown or duplicated prefixes. Supports --dry-run.

Also documents the drop command in skills/mergify-stack/SKILL.md.

Copilot AI review requested due to automatic review settings May 7, 2026 13:47
@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 7, 2026 13:47 Failure
@jd jd temporarily deployed to func-tests-live May 7, 2026 13:47 — with GitHub Actions Inactive
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 7, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new mergify stack drop subcommand to remove one or more commits from the current stack via a single non-interactive scripted rebase, along with tests and user-facing documentation updates.

Changes:

  • Introduce stack_drop() implementation that marks selected stack commits as drop in the rebase todo.
  • Wire the new drop command into the mergify stack CLI (with --dry-run support).
  • Add a dedicated test suite covering dropping first/middle/last/multiple commits, Change-Id matching, and error cases; document the new command in the stack skill doc.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
skills/mergify-stack/SKILL.md Documents the new mergify stack drop workflow and examples.
mergify_cli/tests/stack/test_drop.py Adds end-to-end tests for stack drop behaviors and error handling.
mergify_cli/stack/drop.py Implements the drop logic using existing stack/rebase helpers.
mergify_cli/stack/cli.py Exposes mergify stack drop via Click and connects it to the implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mergify_cli/stack/drop.py
@mergify mergify Bot requested a review from a team May 7, 2026 14:01
@jd jd marked this pull request as ready for review May 7, 2026 15:00
JulianMaurin
JulianMaurin previously approved these changes May 11, 2026
@mergify mergify Bot requested a review from a team May 11, 2026 08:28
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 11, 2026

@jd this pull request is now in conflict 😩

@mergify mergify Bot added the conflict label May 11, 2026
@jd
Copy link
Copy Markdown
Member Author

jd commented May 11, 2026

Revision history

# Type Changes Reason Date
1 initial f3023d3 2026-05-11 08:55 UTC
2 content f3023d3 → 1d45cfe rebase onto main after #1384 (reword) merged — resolve cli.py and SKILL.md conflicts to keep both reword and drop entries side by side 2026-05-11 08:55 UTC
3 content 1d45cfe → 28ef370 second rebase: resolve SKILL.md conflict after #1385 (skill edit) merged — Common Mistakes table and Commands block now keep edit, reword, drop entries together 2026-05-11 11:44 UTC

@jd jd force-pushed the devs/jd/feat/stack-drop/add-mergify-stack-drop-cmd--27bd94a9 branch from f3023d3 to 1d45cfe Compare May 11, 2026 08:55
@jd jd temporarily deployed to func-tests-live May 11, 2026 08:55 — with GitHub Actions Inactive
@jd jd temporarily deployed to func-tests-live May 11, 2026 08:55 — with GitHub Actions Inactive
@mergify mergify Bot dismissed JulianMaurin’s stale review May 11, 2026 08:55

Pull request has been modified.

@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 11, 2026 08:55 Failure
@mergify mergify Bot removed the conflict label May 11, 2026
kozlek
kozlek previously approved these changes May 11, 2026
@mergify mergify Bot requested a review from a team May 11, 2026 10:02
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 11, 2026

@jd this pull request is now in conflict 😩

@mergify mergify Bot added the conflict label May 11, 2026
Add "mergify stack drop COMMIT..." which removes one or more commits
from the stack in a single non-interactive rebase, replacing the
brittle "GIT_SEQUENCE_EDITOR='sed -i ... pick → drop' git rebase -i"
recipe agents tend to reach for.

Multiple commits can be listed (matched by SHA or Change-Id prefix);
unlike fixup, dropping the first commit in the stack is fine. Errors
on unknown or duplicated prefixes. Supports --dry-run.

Also documents the drop command in skills/mergify-stack/SKILL.md.

Change-Id: I27bd94a961af67e8f53af2927591d59e4363c1cd
@jd jd force-pushed the devs/jd/feat/stack-drop/add-mergify-stack-drop-cmd--27bd94a9 branch from 1d45cfe to 28ef370 Compare May 11, 2026 11:44
@jd jd temporarily deployed to func-tests-live May 11, 2026 11:44 — with GitHub Actions Inactive
@mergify mergify Bot dismissed kozlek’s stale review May 11, 2026 11:45

Pull request has been modified.

@mergify mergify Bot deployed to Mergify Merge Protections May 11, 2026 11:45 Active
@mergify mergify Bot removed the conflict label May 11, 2026
@mergify mergify Bot requested a review from a team May 11, 2026 11:58
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 11, 2026

Merge Queue Status

  • Entered queue2026-05-11 14:28 UTC · Rule: default
  • Checks skipped · PR is already up-to-date
  • Merged2026-05-11 14:28 UTC · at 28ef370579f39b4c030c9de5086647f3fbf9ecc2 · squash

This pull request spent 23 seconds in the queue, including 6 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label May 11, 2026
@mergify mergify Bot merged commit 77a9f92 into main May 11, 2026
19 checks passed
@mergify mergify Bot deleted the devs/jd/feat/stack-drop/add-mergify-stack-drop-cmd--27bd94a9 branch May 11, 2026 14:28
@mergify mergify Bot removed the queued label May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants