Skip to content

fix(stack): Rebase branch in dry-run mode for accurate plan output#974

Merged
mergify[bot] merged 1 commit intomainfrom
devs/remyduthu/fix-dry-run/If1e56b2bd38dc668e57ffb814b06436225e6837d
Feb 26, 2026
Merged

fix(stack): Rebase branch in dry-run mode for accurate plan output#974
mergify[bot] merged 1 commit intomainfrom
devs/remyduthu/fix-dry-run/If1e56b2bd38dc668e57ffb814b06436225e6837d

Conversation

@remyduthu
Copy link
Contributor

The dry-run plan was showing stale pre-rebase commit hashes, making its
output inconsistent with actual push. Rebase is now always performed
unless --skip-rebase is explicitly passed.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Copilot AI review requested due to automatic review settings February 18, 2026 14:43
@mergify mergify bot had a problem deploying to Mergify Merge Protections February 18, 2026 14:43 Failure
@remyduthu remyduthu self-assigned this Feb 18, 2026
@mergify
Copy link
Contributor

mergify bot commented Feb 18, 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)(?:\(.+\))?:

🟢 🔎 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
Copy link
Contributor

mergify bot commented Feb 18, 2026

🧪 CI Insights

Here's what we observed from your CI run for b5eeb64.

🟢 All jobs passed!

But CI Insights is watching 👀

@remyduthu remyduthu marked this pull request as ready for review February 18, 2026 14:45
@mergify mergify bot requested a review from a team February 18, 2026 14:46
JulianMaurin
JulianMaurin previously approved these changes Feb 18, 2026
Copy link

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

This PR fixes an issue where the dry-run mode in mergify stack push was showing stale pre-rebase commit hashes, making the plan output inconsistent with what would actually be pushed. The fix ensures that rebase is always performed unless --skip-rebase is explicitly passed, even in dry-run mode.

Changes:

  • Modified stack_push() to perform rebase regardless of dry_run flag (only respects skip_rebase flag)
  • Added two new test cases to verify rebase behavior in dry-run mode with and without --skip-rebase

Reviewed changes

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

File Description
mergify_cli/stack/push.py Removed the if not dry_run condition wrapping the rebase logic, so rebase now runs in dry-run mode unless --skip-rebase is set
mergify_cli/tests/stack/test_push.py Added test_stack_dry_run_rebases() and test_stack_dry_run_skip_rebase() to verify the new behavior

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

@remyduthu remyduthu requested a review from a team February 18, 2026 15:05
Copy link
Member

@sileht sileht left a comment

Choose a reason for hiding this comment

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

It's weird to have a dry-run command that changes the git tree.

Instead, we should detect if a rebase is needed or not, or something like this, no?

jd
jd previously requested changes Feb 18, 2026
Copy link
Member

@jd jd left a comment

Choose a reason for hiding this comment

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

It's not a dry run if you do the rebase.

@remyduthu remyduthu force-pushed the devs/remyduthu/fix-dry-run/If1e56b2bd38dc668e57ffb814b06436225e6837d branch from f6adf56 to 988e64b Compare February 19, 2026 10:34
@mergify mergify bot dismissed stale reviews from JulianMaurin and jd February 19, 2026 10:34

Pull request has been modified.

@mergify mergify bot had a problem deploying to Mergify Merge Protections February 19, 2026 10:34 Failure
@mergify mergify bot requested a review from a team February 19, 2026 10:36
@mergify mergify bot requested a review from a team February 19, 2026 10:39
@remyduthu remyduthu marked this pull request as draft February 24, 2026 14:31
@remyduthu remyduthu force-pushed the devs/remyduthu/fix-dry-run/If1e56b2bd38dc668e57ffb814b06436225e6837d branch from 988e64b to 008549e Compare February 26, 2026 09:23
@mergify mergify bot had a problem deploying to Mergify Merge Protections February 26, 2026 09:23 Failure
@remyduthu remyduthu force-pushed the devs/remyduthu/fix-dry-run/If1e56b2bd38dc668e57ffb814b06436225e6837d branch from 008549e to e902a2b Compare February 26, 2026 09:25
@mergify mergify bot had a problem deploying to Mergify Merge Protections February 26, 2026 09:25 Failure
@remyduthu remyduthu force-pushed the devs/remyduthu/fix-dry-run/If1e56b2bd38dc668e57ffb814b06436225e6837d branch from e902a2b to 160fac3 Compare February 26, 2026 09:26
@mergify mergify bot had a problem deploying to Mergify Merge Protections February 26, 2026 09:26 Failure
The dry-run plan was showing stale pre-rebase commit hashes, making its
output inconsistent with actual push. Rebase is now always performed
unless --skip-rebase is explicitly passed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: If1e56b2bd38dc668e57ffb814b06436225e6837d
@remyduthu remyduthu force-pushed the devs/remyduthu/fix-dry-run/If1e56b2bd38dc668e57ffb814b06436225e6837d branch from 160fac3 to b5eeb64 Compare February 26, 2026 09:27
@mergify mergify bot deployed to Mergify Merge Protections February 26, 2026 09:27 Active
@remyduthu remyduthu marked this pull request as ready for review February 26, 2026 09:27
@mergify mergify bot requested a review from a team February 26, 2026 09:29
@mergify
Copy link
Contributor

mergify bot commented Feb 26, 2026

Merge Queue Status

Rule: default


  • Entered queue2026-02-26 09:41 UTC
  • Checks passed · in-place
  • Merged2026-02-26 09:41 UTC · at b5eeb6473ed5c4c3cd7a098ff88ebbe7fbd67e27

This pull request spent 5 seconds in the queue, with no time running CI.

Required conditions to merge

@mergify mergify bot merged commit 3bbedfe into main Feb 26, 2026
18 checks passed
@mergify mergify bot added the queued label Feb 26, 2026
@mergify mergify bot deleted the devs/remyduthu/fix-dry-run/If1e56b2bd38dc668e57ffb814b06436225e6837d branch February 26, 2026 09:41
@mergify mergify bot removed the queued label Feb 26, 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.

5 participants