committed
committed copied to clipboard
RFE: check allowed authors
A check for allowed authors would be nice, for example so that projects wanting committers to use their project/organization related e-mail addresses for commits could check that.
I think a regex config option and related (inverse) matching similar to ignore_author_re could be used for this.
Mind writing up a proposed schema with an example of what data it would allow/disallow and what that message would look like?
Mini-PR in https://github.com/crate-ci/committed/pull/354 -- feel free to reuse that and the associated branch for the implementation if you're taking this on.
- The regex would be matched against the commit author (whole string), just like
ignore_author_re. - If the regex matches, all good, no messages.
- If it does not match, would cause an error with a message like
Commit author `{}` does not match allowed regular expression `{}`
Seems reasonable if someone wants to implement it.