From 8bd8627ba1a9ec1c0d832bd40652f7675afd2f28 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sun, 22 Dec 2024 17:48:28 +0100 Subject: [PATCH] chore: add reapply as valid commit type When you revert a revert commit, most version control systems (like Git) will suggest a default commit message that starts with "Reapply" followed by the original commit message that was reverted. Signed-off-by: Daniel Kesselberg --- src/isValidCommitMesage.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/isValidCommitMesage.ts b/src/isValidCommitMesage.ts index c9a8cd4..86b4df4 100644 --- a/src/isValidCommitMesage.ts +++ b/src/isValidCommitMesage.ts @@ -9,15 +9,13 @@ const DEFAULT_COMMIT_TYPES = [ "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 ")) { + if (message.startsWith("Merge ") || message.startsWith("Revert ") || message.startsWith("Reapply ") { return true; }