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

feat(validateSingleCommit)!: check if the PR title matches the commit title #158

Merged

Conversation

kenji-miyake
Copy link
Contributor

When we have a single semantic commit, even if we edit the PR title, it doesn't affect the squashed commit message. I think people usually don't want this behavior.

image

With this PR, we can ensure the PR title matches the commit title.

@amannn I believe this will break the current behavior, so could you tell me how do you feel about it? Should I implement another parameter for this?

Kenji Miyake added 2 commits February 4, 2022 22:47
Copy link
Owner

@amannn amannn left a comment

Choose a reason for hiding this comment

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

This is a fair point, thanks for the PR!

Honestly even if it can be seen as breaking, I feel like this just clears up confusion and makes the strange behaviour from Github a bit more transparent.

So personally I think we can get this merged in a minor release.

What do you think about a slightly more elaborative error message?

src/index.js Outdated Show resolved Hide resolved
kenji-miyake and others added 2 commits February 5, 2022 00:57
Co-authored-by: Jan Amann <[email protected]>
Signed-off-by: Kenji Miyake <[email protected]>
@amannn amannn merged commit f1216e9 into amannn:master Feb 4, 2022
@github-actions
Copy link

github-actions bot commented Feb 4, 2022

🎉 This PR is included in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@roniemartinez
Copy link

roniemartinez commented Feb 8, 2022

This update is breaking with dependabot.

Error: The pull request has only one (non-merge) commit and in this case Github will use it as the default commit message when merging. The pull request title doesn't match the commit though ("build(deps): bump amannn/action-semantic-pull-request from 3.6.0 to 4.1.0" vs. "build(deps): bump amannn/action-semantic-pull-request"). Please update the pull request title accordingly to avoid surprises.

@amannn
Copy link
Owner

amannn commented Feb 8, 2022

It's fixed in v4.2.0

@kenji-miyake kenji-miyake deleted the check-pr-title-matches-commit-title branch April 11, 2022 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants