Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DevTools] Disable sizeBot on DevTools Rull Request #21885

Merged
merged 3 commits into from
Aug 2, 2021

Conversation

ryota-murakami
Copy link
Contributor

Because DevTools code doesn't affect production bundle size.
Meaningless sizeBot comment give us frastration within Pull Request discussion.

Because DevTools code doesn't affect production bundle size.
Meaningless sizeBot comment give us frastration within Pull Request discussion.
dangerfile.js Outdated
@@ -113,6 +113,10 @@ function row(result) {
return;
}

// Disable sizeBot in a Devtools PR like bellow title. Because that doesn't affect production bundle size.
// [Fix DevTools console announcement being suppressed by Fast Refresh #21864](https://github.com/facebook/react/pull/21864)
if (new RegExp('devtools?', 'i').test(danger.github.pr.title)) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of this pull request, but I think maybe we shouldn't rely on the name of the title. (There may be DevTools-focused PRs that also change things in non-DevTools code.)

If we can instead look at the list of changed files and skip it if all files are in packages/react-devtools* then that would be okay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bvaughn Thank you for your decent review!
Totally I agree with you, actually I could only achieved by this way in a short spare time 😅

look at the list of changed files and skip it if all files are in packages/react-devtools* then that would be okay.

I'll follow and implement this safety way and then I'll mention you review request again.
To making detect only packages/react-devtools* files logic I wanna little bit explore codebase for seek something effective util code in this situation.
So might be I'll update my work within about a week.

misc. I searched about toplevel return statement in node.js and stackoverflow says that equivalent to process.exit().
I learned return process.exit(0) process.exit() are all equivalent exit status today 🤗

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll follow and implement this safety way and then I'll mention you review request again.
To making detect only packages/react-devtools* files logic I wanna little bit explore codebase for seek something effective util code in this situation.
So might be I'll update my work within about a week.

Sounds good 👍🏼

@ryota-murakami ryota-murakami force-pushed the feat/disable-sizebot-devtools branch from 71642bd to 078a28f Compare July 29, 2021 18:45
@ryota-murakami
Copy link
Contributor Author

@bvaughn I implemented logic to check wether Devtools package files only committed.
How is that?

@ryota-murakami ryota-murakami requested a review from bvaughn July 30, 2021 16:23
Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@bvaughn bvaughn merged commit d3f8747 into facebook:main Aug 2, 2021
@ryota-murakami ryota-murakami deleted the feat/disable-sizebot-devtools branch August 2, 2021 14:18
@ryota-murakami
Copy link
Contributor Author

Thank you for your review!

zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
* [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 a43aab9.

* check whether devtools package file only committed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants