From 78bb20dc6a20a7b83e2f69c45f5b932a3bff588f Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Wed, 20 Dec 2017 21:11:59 -0500 Subject: [PATCH] Danger: badge examples are not lib/ + wordsmith (#1381) --- dangerfile.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dangerfile.js b/dangerfile.js index 4f86d3d6e2417..e4460ccb285cc 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -18,7 +18,11 @@ const documentation = fileMatch( ); const server = fileMatch('server.js'); const serviceTests = fileMatch('service-tests/*.js'); -const helpers = fileMatch('lib/**/*.js', '!**/*.spec.js'); +const helpers = fileMatch( + 'lib/**/*.js', + '!**/*.spec.js', + '!lib/all-badge-examples.js' +); const helperTests = fileMatch('lib/**/*.spec.js'); const packageJson = fileMatch('package.json'); const packageLock = fileMatch('package-lock.json'); @@ -31,7 +35,10 @@ message([ ].join('')); if (documentation.createdOrModified) { - message('We :heart: our [documentarians](http://www.writethedocs.org/)!'); + message([ + 'Thanks for contributing to our documentation. ', + 'We :heart: our [documentarians](http://www.writethedocs.org/)!' + ].join('')); } if (packageJson.modified && !packageLock.modified) { @@ -49,12 +56,12 @@ if (server.modified && !serviceTests.createdOrModified) { if (helpers.created && !helperTests.created) { warn([ - 'This PR added helper modules in lib/ but not accompanying tests. ', + 'This PR added helper modules in `lib/` but not accompanying tests. ', 'Generally helper modules should have their own tests.', ].join('')); } else if (helpers.createdOrModified && !helperTests.createdOrModified) { warn([ - 'This PR modified helper functions in lib/ but not accompanying tests. ', + 'This PR modified helper functions in `lib/` but not accompanying tests. ', "That's okay so long as it's refactoring existing code.", ].join('')); }