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,22 +319,22 @@ fs.readdir(pluginPath, (err, rootFiles) => {
|
|||
}
|
||||
}
|
||||
// eslint-disable-next-line max-len
|
||||
const badgeOne = ``;
|
||||
const publishBadge = ``;
|
||||
// eslint-disable-next-line max-len
|
||||
const badgeTwo = ``;
|
||||
const testBadge = ``;
|
||||
if (readme.toLowerCase().indexOf('travis') !== -1) {
|
||||
console.warn('Remove Travis badges');
|
||||
}
|
||||
if (readme.indexOf('workflows/Node.js%20Package/badge.svg') === -1) {
|
||||
console.warn('No Github workflow badge detected');
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (files.indexOf('license') === -1 && files.indexOf('license.md') === -1) {
|
||||
console.warn('LICENSE.md file not found, please create');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue