Guy Grin
Guy Grin

Reputation: 2032

Github ruleset fails incorrectly

I'm setting a ruleset on my repository that follows this example.

The rule applies to my master branch. I'm not able to merge any branch to it and I'm getting the following error:

Merging is blocked

Commit message must start with a matching pattern: ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(([\w-.]+))?(!)?: ([\w ])+([\s\S]*)

I've created a sample branch with a single commit with this message: chore(myfeature): added empty file, and I'm still getting this error.

I would note that this is a fairly old repo and I'm assuming that there are commits on master that don't follow this convention, but I'm not sure if that's relevant.

Any ideas as to why this happens or how can we fix this?

Upvotes: 0

Views: 503

Answers (1)

Guy Grin
Guy Grin

Reputation: 2032

It seems we misconfigured the ruleset.

We set it to "Must start with the matching pattern", and we should have set it to "Must match a given regex pattern"

Upvotes: 1

Related Questions