feat(stack): add mergify stack drop command#1383
Conversation
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 👀 Review RequirementsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
There was a problem hiding this comment.
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 asdropin the rebase todo. - Wire the new
dropcommand into themergify stackCLI (with--dry-runsupport). - 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.
|
@jd this pull request is now in conflict 😩 |
Revision history
|
f3023d3 to
1d45cfe
Compare
Pull request has been modified.
|
@jd this pull request is now in conflict 😩 |
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
1d45cfe to
28ef370
Compare
Merge Queue Status
This pull request spent 23 seconds in the queue, including 6 seconds running CI. Required conditions to merge
|
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.