Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Distinguish merge commits when checking commit message. #730

Closed
donquixote opened this issue Jan 26, 2020 · 1 comment
Closed

Distinguish merge commits when checking commit message. #730

donquixote opened this issue Jan 26, 2020 · 1 comment

Comments

@donquixote
Copy link

Q A
Version GrumPHP 0.15.2
Bug? no
New feature? yes
Question? no
Documentation? no
Related tickets

class CommitMessage analyses if the commit message matches a given pattern. The exact rules can be configured.

Typically, a merge commit will have a different commit message than a regular commit.
E.g. Merge branch 'a' into b. vs Issue #55: Add more tests..

Currently grumphp does not distinguish between actual merge commits and regular commits.
This means it is possible to (accidentally) name a non-merge commit like Merge 'a' into b. without grumphp complaining.

It would be great if grumphp could distinguish between these cases.

If we want to be excessive we could also distinguish multi-parent commits :) but let's not overdo it!

@veewee
Copy link
Contributor

veewee commented Aug 27, 2020

Currently the merge patterns are ok. I agree that it allows you to bypass the system, but so does adding the -n option to a git commit.

In order to detect if current commit is an acutal merge commit, additional git commands need to be executed. (Checking if the commit contains multiple parents).

Feel free to provide a solution for this.

@veewee veewee closed this as completed Apr 30, 2021
@phpro phpro locked and limited conversation to collaborators Apr 30, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants