From ccfd211c10998387cfd47474c8de1e26edf45e66 Mon Sep 17 00:00:00 2001 From: Eric Leung Date: Sat, 10 Jun 2017 00:50:31 -0700 Subject: [PATCH] feat(index): Restrict title without end period This commit filters and edits potential commit titles so that any number of trailing periods are removed before creating the commit title. --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 32e6355..68934fe 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,12 @@ module.exports = { name: 'subject', message: dedent` Write a short, imperative tense description of the change: - ` + `, + filter: function(input) { + return new Promise((resolve, reject) => { + resolve(input.replace(/\.*$/, "")); + }); + } }, { type: 'input', name: 'body',