commitmonkey
Version:
commitmonkey is a Git hook that rewrites your boring commit messages into brutally honest, questionably professional roasts.
19 lines (15 loc) • 488 B
JavaScript
const fs = require('fs');
const path = require('path');
const os = require('os');
const yaml = require('yaml');
const OPTIONS_FILE = path.join(os.homedir(), '.commitmonkey.yaml');
let OPTIONS = {};
if (!fs.existsSync(OPTIONS_FILE)) {
console.error('❌ CommitMonkey must have options file in ~/.commitmonkey.yaml. See README for details.');
process.exit(1);
} else {
OPTIONS = yaml.parse(fs.readFileSync(OPTIONS_FILE, 'utf8'));
}
module.exports = {
OPTIONS: OPTIONS
};