mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
only fix if autofix is set
This commit is contained in:
parent
3b89b89004
commit
febe1f512c
1 changed files with 6 additions and 6 deletions
|
@ -319,20 +319,20 @@ fs.readdir(pluginPath, (err, rootFiles) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
const badgeOne = ``;
|
const publishBadge = ``;
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
const badgeTwo = ``;
|
const testBadge = ``;
|
||||||
if (readme.toLowerCase().indexOf('travis') !== -1) {
|
if (readme.toLowerCase().indexOf('travis') !== -1) {
|
||||||
console.warn('Remove Travis badges');
|
console.warn('Remove Travis badges');
|
||||||
}
|
}
|
||||||
if (readme.indexOf('workflows/Node.js%20Package/badge.svg') === -1) {
|
if (readme.indexOf('workflows/Node.js%20Package/badge.svg') === -1) {
|
||||||
console.warn('No Github workflow badge detected');
|
console.warn('No Github workflow badge detected');
|
||||||
if (autoFix) {
|
if (autoFix) {
|
||||||
readme = `${badgeOne} ${badgeTwo}\n\n${readme}`;
|
readme = `${publishBadge} ${testBadge}\n\n${readme}`;
|
||||||
|
// write readme to file system
|
||||||
|
fs.writeFileSync(`${pluginPath}/${readMeFileName}`, readme);
|
||||||
|
console.log('Wrote Github workflow badges to README');
|
||||||
}
|
}
|
||||||
// write readme to file system
|
|
||||||
fs.writeFileSync(`${pluginPath}/${readMeFileName}`, readme);
|
|
||||||
console.log('Wrote Github workflow badges to README');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue