2022-06-17 23:21:45 +00:00
|
|
|
import { danger, warn, message } from 'danger';
|
|
|
|
|
|
|
|
const docs = danger.git.fileMatch('docs/**/*.md');
|
|
|
|
const app = danger.git.fileMatch('app/**/*.(js|ts|tsx)');
|
2022-06-21 17:35:56 +00:00
|
|
|
const tests = danger.git.fileMatch('**/__tests__/**');
|
2022-06-17 23:21:45 +00:00
|
|
|
|
|
|
|
if (docs.edited) {
|
|
|
|
message('Thanks - We :heart: our [documentarians](http://www.writethedocs.org/)!');
|
|
|
|
}
|
|
|
|
|
|
|
|
if (app.modified && !tests.modified) {
|
|
|
|
warn('You have app changes without tests.');
|
|
|
|
}
|