|
|
|
@ -52,12 +52,16 @@ async function checkCommit({ files }) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function checkRemote() {
|
|
|
|
|
const { remote } = await git.fetch('origin', 'master');
|
|
|
|
|
if (remote?.indexOf('ant-design/ant-design') === -1) {
|
|
|
|
|
console.log(
|
|
|
|
|
chalk.yellow('😓 Your remote origin is not ant-design/ant-design, did you fork it?'),
|
|
|
|
|
);
|
|
|
|
|
exitProcess();
|
|
|
|
|
try {
|
|
|
|
|
const { remote } = await git.fetch('origin', 'master');
|
|
|
|
|
if (remote?.indexOf('ant-design/ant-design') === -1) {
|
|
|
|
|
console.log(
|
|
|
|
|
chalk.yellow('😓 Your remote origin is not ant-design/ant-design, did you fork it?'),
|
|
|
|
|
);
|
|
|
|
|
exitProcess();
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log(chalk.red('🚨 Check remote failed. Skip...'));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|