mirror of
https://github.com/webiny/action-conventional-commits.git
synced 2024-11-10 12:09:34 +01:00
feat: introduce allowed-commit-types
input
This commit is contained in:
parent
b1c8a44db3
commit
033d591e23
1 changed files with 17 additions and 1 deletions
|
@ -1,4 +1,20 @@
|
|||
const isValidCommitMessage = (message: string, availableTypes: string[]): boolean => {
|
||||
const DEFAULT_COMMIT_TYPES = [
|
||||
"feat",
|
||||
"fix",
|
||||
"docs",
|
||||
"style",
|
||||
"refactor",
|
||||
"test",
|
||||
"build",
|
||||
"perf",
|
||||
"ci",
|
||||
"chore",
|
||||
"revert",
|
||||
"merge",
|
||||
"wip",
|
||||
];
|
||||
|
||||
const isValidCommitMessage = (message: string, availableTypes = DEFAULT_COMMIT_TYPES): boolean => {
|
||||
// Exceptions.
|
||||
// This is a message that's auto-generated by git. Can't do much about it unfortunately. Let's allow it.
|
||||
if (message.startsWith("Merge ") || message.startsWith("Revert ")) {
|
||||
|
|
Loading…
Reference in a new issue