From febe1f512c4bc018f6bef452b40ac0777c335d95 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 9 Feb 2021 08:15:09 +0000 Subject: [PATCH] only fix if autofix is set --- src/bin/plugins/checkPlugin.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bin/plugins/checkPlugin.js b/src/bin/plugins/checkPlugin.js index dddfd7d03..ee96d63c3 100755 --- a/src/bin/plugins/checkPlugin.js +++ b/src/bin/plugins/checkPlugin.js @@ -319,20 +319,20 @@ fs.readdir(pluginPath, (err, rootFiles) => { } } // eslint-disable-next-line max-len - const badgeOne = `![Publish Status](https://github.com/ether/${pluginName}/workflows/Node.js%20Package/badge.svg)`; + const publishBadge = `![Publish Status](https://github.com/ether/${pluginName}/workflows/Node.js%20Package/badge.svg)`; // eslint-disable-next-line max-len - const badgeTwo = `![Publish Status](https://github.com/ether/${pluginName}/workflows/Node.js%20Package/badge.svg)`; + const testBadge = `![Backend Tests Status](https://github.com/ether/${pluginName}/workflows/Backend%20tests/badge.svg)`; 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'); } - // write readme to file system - fs.writeFileSync(`${pluginPath}/${readMeFileName}`, readme); - console.log('Wrote Github workflow badges to README'); } }