mirror of
https://github.com/webiny/action-conventional-commits.git
synced 2024-11-23 10:21:51 +01:00
feat: introduce allowed-commit-types
input
This commit is contained in:
parent
aa06c90208
commit
1d48a34279
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.
|
// Exceptions.
|
||||||
// This is a message that's auto-generated by git. Can't do much about it unfortunately. Let's allow it.
|
// 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 ")) {
|
if (message.startsWith("Merge ") || message.startsWith("Revert ")) {
|
||||||
|
|
Loading…
Reference in a new issue