-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use pull request title for squash and merge commit message #423
Conversation
9a55c76
to
d2e65f0
Compare
@sindresorhus What do you think about this? |
extension/content.js
Outdated
@@ -377,6 +377,12 @@ function removeProjectsTab() { | |||
} | |||
} | |||
|
|||
function fixSquashAndMergeTitle() { | |||
$('.btn-group-squash button[type=submit]').click(() => { | |||
$('#merge_title_field').val($('.js-issue-title').text().trim() + ' (' + $('.gh-header-number').text() + ')'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you chose not to use a template literal here?
$('#merge_title_field').val(`${$('.js-issue-title').text().trim()} (${$('.gh-header-number').text()})`);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the habit of too much writing on ES5. Will change that tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea a lot. This is how I usually want to write the commit msg anyway.
Can you add it to the feature highlight? No screenshot needed. |
d2e65f0
to
350f753
Compare
@sindresorhus @paulmolluzzo Updated. |
Great! This is going to be sooo useful for me. I do this manually many times every day. |
Fixes #276