Skip to content

Exclude merge commits from checks #75

Open
@ArjenVanDerWeijden

Description

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Are you willing to sponsor your idea?

  • Yes, I like to sponsor this request

Is your feature request related to a problem? Please describe

We are trying to automate, checking whether commits match a regex - your action works great.

Unless it's a merge commit (e.g. locally a developer merged one branch into another, created a merge commit and pushed that).

The commit message will not match the desired regex.

Describe the solution you'd like

You can check if a commit is a merge commit:

git cat-file -p $commit_id

If there's more than one `parent' line in the output, you found a merge.

If there's a "ignoreMergeCommits" setting acitvated, then do not even test for the regex (just list it as 'ignored'?)

Describe alternatives you've considered

No response

Additional context

No response

Activity

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

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions