From 927376c5f39568cbfcc46f260fe558fd198bb67a Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Wed, 20 Dec 2017 11:05:58 -0500 Subject: [PATCH 1/2] Danger: badge examples are not lib/ + wordsmith --- dangerfile.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dangerfile.js b/dangerfile.js index 4f86d3d6e2417..df4c8c08d4c60 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) { From 219d9b1676ab18e0243717463b9d6f2858ba5e20 Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Wed, 20 Dec 2017 11:07:29 -0500 Subject: [PATCH 2/2] Add some formatting --- dangerfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dangerfile.js b/dangerfile.js index df4c8c08d4c60..e4460ccb285cc 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -56,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('')); }