Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Default description for squashed merge commits #1025

Open
alecbz opened this issue Sep 21, 2017 · 8 comments
Open

Default description for squashed merge commits #1025

alecbz opened this issue Sep 21, 2017 · 8 comments

Comments

@alecbz
Copy link

alecbz commented Sep 21, 2017

Right now when squashing a PR into a single commit to merge, the title defaults to the PR's title (馃憤), but the description defaults to a list of the descriptions of the commits in the PR.

A better default seems like it would be the PR's description, which would also be more consistent with using the PR's title for the commit's summary.

@mikeburke106
Copy link

Even better yet would be supporting a template like the Github template for issues and pull requests. You could create your own template for the title and the description of the squash merge.

@mvalkon
Copy link

mvalkon commented Dec 7, 2017

I'm currently suffering from not having this. For certain compliancy reasons, I need to have the issue number in the commit message that is finally merged to master. I want fast-forward merges only, and prefer a git log in which all commits in master all pass the tests at the time the commit was merged.

Squash and merge allows this (and we can enforce it in repository settings), which is great, but there should be a default option of using the PR title & body as the resulting commit message. Developers sometimes work hard to create informative PR's, and this information is easily lost.

@alecbz
Copy link
Author

alecbz commented Dec 7, 2017

Yeah, I try to be good about manually copy-pasting the PR description before committing the squash, but it's definitely tedious and would be great to not have to do.

@Xeverous
Copy link

Xeverous commented Aug 3, 2019

but the description defaults to a list of the descriptions of the commits in the PR.

This has very little sense because most of post-review commits will be fixes to things mentioned during review. Why can't the person who submits the PR just edit the final commit message?

@dan-cooke
Copy link

dan-cooke commented Apr 14, 2020

@Xeverous

Why can't the person who submits the PR just edit the final commit message?

Because sometimes people are tired and just hit the big green button.

It would be nice if we could at least guide them into copying and pasting this message with a template.

Or better yet - the default message should be the PR description

@alecbz
Copy link
Author

alecbz commented Apr 14, 2020

Yeah, you want to limit the amount of cognitive load to do common things like submitting PRs. Even a small amount of friction can be distracting and tiring. More realistically, people just won't do it.

@mgol
Copy link

mgol commented Apr 27, 2020

They've changed something recently and now when I click Squash & Merge, the final commit description is empty - it picks up neither the commit description (even if there was only one commit in the PR) nor the PR description. This is really bad, it's so easy to lose valuable information when squashing.

Has anyone else noticed the change? I hope it's not just me.

@zachwhaley
Copy link

FWIW I wrote a browser extension to do this

https://github.com/zachwhaley/squashed-merge-message

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants