fix: default commitConvention to 'none' (#179)

This commit is contained in:
ehmicky 2019-04-18 05:50:14 -07:00 committed by Maximilian Berkmann
parent 2376ada660
commit e639593c5d

View file

@ -8,10 +8,17 @@ function readConfig(configPath) {
if (!('repoType' in config)) { if (!('repoType' in config)) {
config.repoType = 'github' config.repoType = 'github'
} }
if (!('commitConvention' in config)) {
config.commitConvention = 'none'
}
return config return config
} catch (error) { } catch (error) {
if (error instanceof SyntaxError) { if (error instanceof SyntaxError) {
throw new SyntaxError(`Configuration file has malformed JSON: ${configPath}. Error:: ${error.message}`) throw new SyntaxError(
`Configuration file has malformed JSON: ${configPath}. Error:: ${
error.message
}`,
)
} }
if (error.code === 'ENOENT') { if (error.code === 'ENOENT') {
throw new Error(`Configuration file not found: ${configPath}`) throw new Error(`Configuration file not found: ${configPath}`)