fix(backend): use singular label in custom commit message (#1917)

This commit is contained in:
Bartholomew 2018-11-29 01:31:04 +01:00 committed by Shawn Erquhart
parent 6c12e8fe4a
commit 2c5827bd99

View File

@ -100,7 +100,7 @@ const commitMessageFormatter = (type, config, { slug, path, collection }) => {
case 'path':
return path;
case 'collection':
return collection.get('label');
return collection.get('label_singular') || collection.get('label');
default:
console.warn(`Ignoring unknown variable “${variable}” in commit message template.`);
return '';