quality-bot
Version:
QBot Online Code Review Application
24 lines (21 loc) • 519 B
JavaScript
const simpleGit = require('simple-git');
const git = simpleGit();
const colors = require('./../common/colors');
const getFileList = async () => {
let statusSummary;
try {
statusSummary = await git.status(['-s']);
} catch (err) {
console.log(colors.Bright + colors.FgRed, err.message, colors.Reset);
process.exit(1);
}
const fileList = [
...new Set([
...statusSummary.staged,
])
];
return fileList;
}
module.exports = {
getFileList
}