Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sync-pr-commit-title feature (replaces fix-squash-and-merge-title) #1934

Merged
merged 12 commits into from
Apr 21, 2019

Conversation

fregante
Copy link
Member

@fregante fregante commented Apr 16, 2019

Fixes #1790
Closes #1743

  • When the commit title is manually updated, RGH will offer to also update the PR title
  • Title/message features merged into one
  • The title box is focused after it's opened
  • The message box now expands to fit the content
  • This now applies to Merge commits too

Next

  • Readme
  • Add migration in background.js
  • Should we drop “fix-squash-and-merge-message”? I'm not entirely sure the new message is useful anyway and it contains a lot of noise ("fixes this and that", "I tried this", "What do you think", PR template comment, etc)
  • Does the "PR title update" part belong to the same feature? There's some overlap and both features kinda do the same thing, in two directions

Test

Commit info update
  1. Visit PR with ONE commit (with 2+ commits, GitHub already updates the title)
  2. Open the merge box (as Squash or Merge)

  1. Visit PR
  2. Change PR title
  3. Open the merge box (as Squash or Merge)
PR title update
  1. Visit PR
  2. Open the merge box (as Squash or Merge)
  3. Change title (the message will appear)
  4. Undo changes (the message will disappear)
  5. Merge (the PR title will be updated if the message was shown)

  1. Visit PR
  2. Open the merge box (as Squash or Merge)
  3. Change title (the message will appear)
  4. Press cancel (the message will disappear)
  5. Merge (the PR title will not be updated)

Untested

Where admin permissions are required

@fregante fregante added the bug label Apr 16, 2019
@fregante fregante changed the title WIP Merge and fix fix-squash-and-merge-* Apr 16, 2019
@fregante fregante changed the title Merge and fix fix-squash-and-merge-* Merge/fix/extend fix-squash-and-merge-* Apr 16, 2019
@fregante fregante marked this pull request as ready for review April 18, 2019 06:14
@fregante
Copy link
Member Author

fregante commented Apr 20, 2019

This is ready! I tested it a few times and it seems to work correctly

@sindresorhus
Copy link
Member

Should we drop “fix-squash-and-merge-message”?

Sure. I'm kinda neutral. I don't find either the PR description (with RG) nor the list of commits (without RG) useful. The initial intention with the feature was good, in that it was more likely the PR description was useful than a list of commits. In reality, nobody writes a good PR description or it's too messy or verbose.

Ideally, it would just extract the Fixes #1232 statements and add that to the merge commit description, as that's what I usually do manually.

Does the "PR title update" part belong to the same feature?

Yes

@fregante fregante changed the title Merge/fix/extend fix-squash-and-merge-* Extend fix-squash-and-merge-title to pr-merge-info-enhancements Apr 21, 2019
@fregante
Copy link
Member Author

Should we drop “fix-squash-and-merge-message”?

Dropped in 9be9440

@fregante fregante changed the title Extend fix-squash-and-merge-title to pr-merge-info-enhancements Add sync-pr-commit-title feature (replaces fix-squash-and-merge-title) Apr 21, 2019
@fregante fregante changed the title Add sync-pr-commit-title feature (replaces fix-squash-and-merge-title) Add sync-pr-commit-title feature (replaces fix-squash-and-merge-title) Apr 21, 2019
@fregante fregante changed the title Add sync-pr-commit-title feature (replaces fix-squash-and-merge-title) Add sync-pr-commit-title feature (replaces fix-squash-and-merge-title) Apr 21, 2019
@fregante
Copy link
Member Author

Oops, merged prematurely while testing. Sent again as #1960

@zachwhaley
Copy link

Wait, is squash and merge message being dropped? We actually use this :(

@bharathwaaj
Copy link

We are also using this :( Please undo

@sindresorhus
Copy link
Member

You can disable the feature in the extension settings.

@zachwhaley
Copy link

You can disable the feature in the extension settings.

@sindresorhus This is not an issue of a new feature we can disable, but the squash-and-merge-message feature that was completely removed and therefore can no longer be used at all.

@billdybas
Copy link

In reality, nobody writes a good PR description or it's too messy or verbose.

@sindresorhus Since our team's process is only to squash-and-merge, I know I take great care about writing good PR descriptions because I know the GitHub default of listing the commit names is not useful (since we all know the one commit that makes it into master really matters).

I strongly urge you to restore the previous behavior of replacing the squash commit's information w/ the PR information. This was the primary reason why I and many of my teammates even considered using Refined GitHub, and now I'm not sure we even find any value in this extension anymore.

@yakov116
Copy link
Member

@sindresorhus @bfred-it I happen to agree. I used this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
7 participants