Skip to content

feat(stack): add move command#1122

Open
jd wants to merge 1 commit intomainfrom
devs/jd/feat/stack-reorder-move/Id3e08ba58709c88ac9eaf8fcf4137f630ba2f383
Open

feat(stack): add move command#1122
jd wants to merge 1 commit intomainfrom
devs/jd/feat/stack-reorder-move/Id3e08ba58709c88ac9eaf8fcf4137f630ba2f383

Conversation

@jd
Copy link
Copy Markdown
Member

@jd jd commented Apr 10, 2026

Add mergify stack move to move a single commit within the stack.
Supports natural positional syntax:

mergify stack move before
mergify stack move after
mergify stack move first
mergify stack move last

Reuses the shared rebase helpers from the reorder module.
Supports --dry-run and both SHA and Change-Id prefix identification.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Claude-Session-Id: cdc0d010-0b6d-4808-a13c-d8e205472a4b

@jd
Copy link
Copy Markdown
Member Author

jd commented Apr 10, 2026

This pull request is part of a stack:

  1. feat(stack): add move command (#1122) 👈

@mergify mergify bot had a problem deploying to Mergify Merge Protections April 10, 2026 11:22 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 10, 2026

Merge Protections

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

🔴 👀 Review Requirements

Waiting for:

  • #approved-reviews-by>=2

or

  • author = dependabot[bot]

or

  • author = mergify-ci-bot

or

  • author = renovate[bot]
This rule is failing.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🔴 🔎 Reviews

Waiting for:

  • #review-requested = 0
This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

🟢 🤖 Continuous Integration

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

🟢 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)(?:\(.+\))?:

🟢 📕 PR description

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

@jd jd force-pushed the devs/jd/feat/stack-reorder-move/Id3e08ba58709c88ac9eaf8fcf4137f630ba2f383 branch from 7220a93 to be67877 Compare April 10, 2026 13:29
@mergify mergify bot had a problem deploying to Mergify Merge Protections April 10, 2026 13:29 Failure
@mergify mergify bot requested a review from a team April 10, 2026 13:32
@jd jd marked this pull request as ready for review April 10, 2026 13:35
Copilot AI review requested due to automatic review settings April 10, 2026 13:35
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 move command to reposition a single commit within the current stack, building on the existing non-interactive rebase helpers introduced for stack reordering.

Changes:

  • Introduce mergify_cli.stack.move.stack_move() to compute a new commit order and execute (or preview) the rebase.
  • Wire the new move subcommand into the stack CLI and document usage in the stack skill guide.
  • Add end-to-end style tests for move scenarios (before/after/first/last, dry-run, and validation cases).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
mergify_cli/stack/move.py New implementation of commit movement using existing reorder/rebase helpers.
mergify_cli/stack/cli.py Registers the mergify stack move command and its arguments/options.
mergify_cli/stack/skill.md Documents the new move syntax alongside reorder guidance and examples.
mergify_cli/tests/stack/test_move.py Adds functional tests covering move behavior and error cases.

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

Base automatically changed from devs/jd/feat/stack-reorder-move/I46dc35fd28e3535e9f64f85581db87a50b6d4c21 to main April 10, 2026 14:09
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 10, 2026

@jd this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Apr 10, 2026
@jd jd force-pushed the devs/jd/feat/stack-reorder-move/Id3e08ba58709c88ac9eaf8fcf4137f630ba2f383 branch from be67877 to 689a87d Compare April 10, 2026 14:31
@mergify mergify bot removed the conflict label Apr 10, 2026
@mergify mergify bot deployed to Mergify Merge Protections April 10, 2026 14:31 Active
JulianMaurin
JulianMaurin previously approved these changes Apr 10, 2026
Copy link
Copy Markdown
Contributor

@JulianMaurin JulianMaurin left a comment

Choose a reason for hiding this comment

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

not sure about this one 🤔

@mergify mergify bot requested a review from a team April 10, 2026 17:37
kozlek
kozlek previously approved these changes Apr 10, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 10, 2026

@jd this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Apr 10, 2026
Add `mergify stack move` to move a single commit within the stack.
Supports natural positional syntax:

  mergify stack move <commit> before <target>
  mergify stack move <commit> after <target>
  mergify stack move <commit> first
  mergify stack move <commit> last

Reuses the shared rebase helpers from the reorder module.
Supports --dry-run and both SHA and Change-Id prefix identification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change-Id: Id3e08ba58709c88ac9eaf8fcf4137f630ba2f383
Claude-Session-Id: cdc0d010-0b6d-4808-a13c-d8e205472a4b
@jd jd force-pushed the devs/jd/feat/stack-reorder-move/Id3e08ba58709c88ac9eaf8fcf4137f630ba2f383 branch from 689a87d to af55a58 Compare April 11, 2026 07:06
@mergify mergify bot removed the conflict label Apr 11, 2026
@mergify mergify bot dismissed stale reviews from kozlek and JulianMaurin April 11, 2026 07:06

Pull request has been modified.

@mergify mergify bot had a problem deploying to Mergify Merge Protections April 11, 2026 07:06 Failure
@mergify mergify bot requested a review from a team April 11, 2026 07:10
@mergify mergify bot requested a review from a team April 11, 2026 08:33
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