Skip to content

feat(stack): add mergify stack fixup command#1265

Merged
mergify[bot] merged 2 commits intomainfrom
devs/jd/worktree-squash/add-mergify-stack-fixup-cmd--98a90fd7
Apr 21, 2026
Merged

feat(stack): add mergify stack fixup command#1265
mergify[bot] merged 2 commits intomainfrom
devs/jd/worktree-squash/add-mergify-stack-fixup-cmd--98a90fd7

Conversation

@jd
Copy link
Copy Markdown
Member

@jd jd commented Apr 20, 2026

Add "mergify stack fixup COMMIT..." which folds each listed commit into
its parent inside the stack (dropping its message) without opening an
editor. Multiple commits can be listed: each folds into its own parent.

Errors when a listed commit is first-in-stack, unknown, or duplicated.
Supports --dry-run.

Depends-On: #1264

@mergify mergify Bot had a problem deploying to Mergify Merge Protections April 20, 2026 13:41 Failure
@jd
Copy link
Copy Markdown
Member Author

jd commented Apr 20, 2026

This pull request is part of a Mergify stack:

# Pull Request Link
1 refactor(stack): add rebase helpers for squash and fixup #1264
2 feat(stack): add mergify stack fixup command #1265 👈
3 feat(stack): add mergify stack squash command #1266

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 20, 2026

Merge Protections

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

🟢 ⛓️ Depends-On Requirements

Wonderful, this rule succeeded.

Requirement based on the presence of Depends-On in the body of the pull request

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

🟢 🔎 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,})

@mergify mergify Bot requested a review from a team April 20, 2026 13:47
@jd jd marked this pull request as ready for review April 20, 2026 13:47
jd added 2 commits April 20, 2026 15:58
Adds two helpers to mergify_cli/stack/reorder.py, used by the new
squash and fixup commands:

- run_action_rebase reorders picks to a desired sha order (same as
  run_rebase) and additionally rewrites pick -> squash|fixup for shas
  listed in actions. An optional exec_after_sha + exec_command pair
  inserts an "exec <cmd>" line right after the named sha's row — used
  by squash to amend the combined commit's message while HEAD still
  points at it.
- display_action_plan prints the plan tagged with each commit's action.

run_rebase now delegates to run_action_rebase with an empty actions
dict to avoid duplicating the embedded rebase-todo rewrite script.

No user-facing behavior change — preparation for the fixup and squash
commands.

Change-Id: I560beaa3ed28ee211f601d15e550411fbe8107c4
Add "mergify stack fixup COMMIT..." which folds each listed commit into
its parent inside the stack (dropping its message) without opening an
editor. Multiple commits can be listed: each folds into its own parent.

Errors when a listed commit is first-in-stack, unknown, or duplicated.
Supports --dry-run.

Change-Id: I98a90fd7225be7b88ce2e879a0576f36d7f19d0b
@jd jd force-pushed the devs/jd/worktree-squash/add-mergify-stack-fixup-cmd--98a90fd7 branch from c624cda to f9e9116 Compare April 20, 2026 14:08
@jd
Copy link
Copy Markdown
Member Author

jd commented Apr 20, 2026

Revision history

# Type Changes Date
1 initial c624cda 2026-04-20 14:08 UTC
2 content c624cda → f9e9116 2026-04-20 14:08 UTC

@mergify mergify Bot deployed to Mergify Merge Protections April 20, 2026 14:08 Active
@mergify mergify Bot requested a review from a team April 21, 2026 07:37
Base automatically changed from devs/jd/worktree-squash/add-rebase-helpers-squash-fixup--560beaa3 to main April 21, 2026 07:43
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 21, 2026

Merge Queue Status

This pull request spent 7 minutes 36 seconds in the queue, including 6 minutes 49 seconds running CI.

Required conditions to merge

mergify Bot added a commit that referenced this pull request Apr 21, 2026
@mergify mergify Bot added the queued label Apr 21, 2026
mergify Bot added a commit that referenced this pull request Apr 21, 2026
mergify Bot added a commit that referenced this pull request Apr 21, 2026
@mergify mergify Bot merged commit 87461d3 into main Apr 21, 2026
11 checks passed
@mergify mergify Bot deleted the devs/jd/worktree-squash/add-mergify-stack-fixup-cmd--98a90fd7 branch April 21, 2026 07:59
@mergify mergify Bot removed the queued label Apr 21, 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.

3 participants