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

Use pull request title for squash and merge commit message #423

Merged
merged 2 commits into from
May 16, 2017

Conversation

hkdobrev
Copy link
Contributor

Fixes #276

@hkdobrev
Copy link
Contributor Author

@sindresorhus What do you think about this?

@@ -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() + ')');
Copy link
Contributor

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()})`);

Copy link
Contributor Author

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.

Copy link
Contributor

@paulmolluzzo paulmolluzzo left a 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.

@sindresorhus
Copy link
Member

Can you add it to the feature highlight? No screenshot needed.

@sindresorhus sindresorhus changed the title Use PR title for squash and merge commit message Use pull request title for squash and merge commit message May 15, 2017
@hkdobrev hkdobrev force-pushed the squash-merge-title branch from d2e65f0 to 350f753 Compare May 15, 2017 20:45
@hkdobrev
Copy link
Contributor Author

@sindresorhus @paulmolluzzo Updated.

@sindresorhus sindresorhus merged commit ed2d06f into master May 16, 2017
@sindresorhus sindresorhus deleted the squash-merge-title branch May 16, 2017 04:59
@sindresorhus
Copy link
Member

Great! This is going to be sooo useful for me. I do this manually many times every day.

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

Successfully merging this pull request may close these issues.

3 participants