Prohibit use of `#NNNN` ticket references
Closed this issue · 5 comments
Since several projects use #
to indicate non-Github bug trackers, it would be handy to have the commit checker look for those references and abort the commit if they're found. This should be a non-default option since most Github projects do use #
to refer to tickets and PRs.
Seems like we'll need a new option @jzaefferer, what's your preference on that logic? I was thinking about disallowHash
as the name so falsy would be the default.
Maybe make it a bit more generic? Like ticketPrefixes
(or something along those lines), with a default of "#|gh-", so that its still valid JSON and will always be compiled as a RegEx with "^" and "$" around it. Then you can override it with any kind of prefixes that you like.
Oh i like that better.
It is possile to prohibit #NNNN
style ticket references by setting the ticketPattern
and markerPattern
regular expressions, shown in this PR and by this profile in test.js
PS: Those options are recent additions, so it is now possible.