Skip to content

Commit

Permalink
Masonry experiments warning (pinterest#374)
Browse files Browse the repository at this point in the history
* wip

* remove canary
  • Loading branch information
chrislloyd authored Sep 24, 2018
1 parent 67a19db commit 99d3ac7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
File renamed without changes.
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## TODO

- [ ] Documentation
- [ ] Tests
- [ ] Experimental evidence (required for Masonry changes)
- [ ] Accessibility checkup
3 changes: 3 additions & 0 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
import bundlesize from './scripts/danger/bundlesize.js';
import changelog from './scripts/danger/changelog.js';
import lockfile from './scripts/danger/lockfile.js';
import experiments from './scripts/danger/experiments.js';

// Add a CHANGELOG entry for app changes
changelog();
// Keep lockfile up to date with package
lockfile();
// Bundle size alerting
bundlesize();
// Experimental reminders
experiments();
13 changes: 13 additions & 0 deletions scripts/danger/experiments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// @flow

export default function experiments() {
const changed = danger.git.modified_files.some(file =>
file.match(/masonry/i)
);
if (changed) {
const title = ':microscope: Experimental data needed';
const message =
'Changes were made to critical components. Do you have experimental data to back up your changes?';
warn(`${title} - <i>${message}</i>`);
}
}

0 comments on commit 99d3ac7

Please sign in to comment.