Page MenuHomePhabricator

Make rules and MessageValidator configurable
Open, LowPublicFeature

Description

Currently in commit-message-validator, the rules aren't configurable yet, that means people that are using this software need to follow our rules as well, I think it would be better if we could make the rules configurable, so people can configure it to adapt their needs..

And also currently we have two MessageValidator, GerritMessageValidator and GitHubMessageValidator, each MessageValidator has its own rules. Currently the MessageValidator that will be used for checking the repository is decided by a function (get_message_validator_class()), I think it would be better if we could make it configurable, so the person who is using this software can select what MessageValidator he/she wanna use for his/her project.

Event Timeline

Vvjjkkii renamed this task from Make rules and MessageValidator configurable to zocaaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii removed rafidaslam as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from zocaaaaaaa to Make rules and MessageValidator configurable.Jul 1 2018, 6:28 PM
CommunityTechBot assigned this task to rafidaslam.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
bd808 triaged this task as Low priority.Tue, Nov 21, 1:08 AM
bd808 changed the subtype of this task from "Task" to "Feature Request".
bd808 added a subscriber: bd808.

Quite a bit of work towards making things more configurable happened in the 2.0.0 release cycle as a side effect of making it easier to vary rules across Gerrit, GitHub, and GitLab repos (rICMVf9bfb67cf64b: Refactor into rules based system). I'm not sure however that there is much value in making commit-message-validator. The project is purpose built for Wikimedia commit message rules and was never really intended to be a general purpose commit message linter.

Folks looking for a general purpose solution would likely be better served by a project like https://github.com/jorisroovers/gitlint

I think it would be better if we could make it configurable, so the person who is using this software can select what MessageValidator he/she wanna use for his/her project.

This is possible as of the 2.0.0 release via the --gerrit|--gitlab|--github command line arguments that can be used if the autodetect logic does not work for your project.