Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@flazouh
Copy link

@flazouh flazouh commented Dec 12, 2025

🧢 Changes

  • Added merge button to stack branch cards when a PR exists
  • Reused existing merge logic from StackedPullRequestCard for consistency
  • Included merge status checks (permissions, mergeable state, stack constraints)
  • Show reopen button for closed PRs that haven't been merged
  • Maintained existing View PR button alongside merge controls
  • Respect read-only mode (no merge button on read-only branches)

☕️ Reasoning

This change improves the user experience by allowing users to merge PRs directly from the branch card view, without needing to navigate to a separate PR view. The merge button uses the same logic and checks as the existing PR merge flow, ensuring consistency in merge behavior and validation.

The implementation:

  • Reuses the MergeButton component which provides merge method selection (merge, rebase, squash)
  • Includes all necessary mergeability checks (permissions, draft status, conflicts, etc.)
  • Handles stack-specific constraints (parent branch push status, base branch targeting)
  • Updates child PR target branches after merge when appropriate
  • Maintains backward compatibility with existing PR viewing functionality

- Add merge button to stack branch cards when a PR exists
- Reuse existing merge logic from StackedPullRequestCard for consistency
- Include merge status checks (permissions, mergeable state, stack constraints)
- Show reopen button for closed PRs
- Maintain existing View PR button alongside merge controls
- Respect read-only mode (no merge button on read-only branches)
@vercel
Copy link

vercel bot commented Dec 12, 2025

@flazouh is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thanks a lot for contributing! Merging branches from the branch view seems useful.

Would you have a video and/or screen shots showing it in action?

Also, since the PR seems AI generated, do you have the time to see the feature through to the end if @krlvi should think it's something we want to take on right now? My feeling is that a lot of iterations are needed to make it usable and maintainable, and my preference is to close it and postpone improvements to the branch list entirely.

@Byron Byron added the feedback requested Feedback was requested to help resolve the issue label Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feedback requested Feedback was requested to help resolve the issue @gitbutler/desktop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants