[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
This commit is contained in:
Ryota Murakami
2021-08-02 22:51:53 +09:00
committed by GitHub
parent d1a58da55d
commit d3f8747c8d

View File

@@ -113,6 +113,17 @@ function row(result) {
return;
}
// Disable sizeBot in a Devtools Pull Request. Because that doesn't affect production bundle size.
const commitFiles = [
...danger.git.created_files,
...danger.git.deleted_files,
...danger.git.modified_files,
];
if (
commitFiles.every(filename => filename.includes('packages/react-devtools'))
)
return;
const resultsMap = new Map();
// Find all the head (current) artifacts paths.