[DevTools] Disable sizeBot on DevTools Rull Request (#21885)
* [DevTools] Disable sizeBot on DevTools Rull Request Because DevTools code doesn't affect production bundle size. Meaningless sizeBot comment give us frastration within Pull Request discussion. * Revert "[DevTools] Disable sizeBot on DevTools Rull Request" This reverts commit a43aab9207d4abc85b60c22b21a374fc54b1c6ea. * check whether devtools package file only committed
Ryota Murakami committed
Aug 2, 2021 at 22:51 UTC
d3f8747c8df098def311ee16d7b36aa1d0976f72
1 file changed
+11
dangerfile.js
+11
@@ -113,6 +113,17 @@ function row(result) {
113
return;
114
}
115
116
+ // Disable sizeBot in a Devtools Pull Request. Because that doesn't affect production bundle size.
117
+ const commitFiles = [
118
+ ...danger.git.created_files,
119
+ ...danger.git.deleted_files,
120
+ ...danger.git.modified_files,
121
+ ];
122
+ if (
123
+ commitFiles.every(filename => filename.includes('packages/react-devtools'))
124
+ )
125
+ return;
126
+
127
const resultsMap = new Map();
128
129
// Find all the head (current) artifacts paths.