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

Feature Request: Block PRs When Exceeding Size Thresholds #107

Open
vmerino opened this issue Apr 30, 2024 · 3 comments
Open

Feature Request: Block PRs When Exceeding Size Thresholds #107

vmerino opened this issue Apr 30, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@vmerino
Copy link

vmerino commented Apr 30, 2024

Hello,

Are there any plans to enable blocking the merge of a pull request if it exceeds a specified size threshold? Thanks for your time!

@rschristian
Copy link
Member

Wouldn't this get quite tedious to constantly bump?

My gut says this is better left as information for people to check while reviewing than a pass/fail action.

@vmerino
Copy link
Author

vmerino commented Apr 30, 2024

Hmm... maybe? Wouldn't it be pass by default, and fail only if threshold is exceeded? If the threshold is set too low, then yes it would be tedious. It seems like some could benefit from having a mechanism for egregious size violations though. For instance, we recently had a case where tree-shaking wasn't occurring as expected, and our bundle size ballooned by 10 MB. In extreme cases like that, I would prefer that the PR be automatically blocked.

@rschristian rschristian added the enhancement New feature or request label May 2, 2024
@rschristian
Copy link
Member

rschristian commented May 4, 2024

If the threshold is set too low, then yes it would be tedious.

Yeah, this is what I was referring to; I think it'd be quite difficult to have the bar be low enough that's it's often useful while not being a tedious pain.

For example, for a web app, you'd probably set that for 10kb-ish? But then if you need to add some graph lib, or some lib inlines SVGs/CSS/whatever, you'll be back in the action bumping up the size every time you're adding a sizable feature. To stop it from being a pain, you bump it the detection limit to say 1mb, but then that's not realistically useful, as it's only going to catch the most egregious bugs, so you might miss some regressions you wish you hadn't.

There's a lot of nuance to size increases and if they're justified or not which is why I'd say this is better left as a metric for a person to look over, personally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants