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

Warn about small amounts of MB, not GB #2785

Merged
merged 2 commits into from
Feb 26, 2025
Merged

Warn about small amounts of MB, not GB #2785

merged 2 commits into from
Feb 26, 2025

Conversation

igfoo
Copy link
Contributor

@igfoo igfoo commented Feb 26, 2025

The number of GB is at most 2, and can be tiny. MB gives a more comprehensible range of values.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

The number of GB is at most 2, and can be tiny. MB gives a more
comprehensible range of values.
@igfoo igfoo changed the title Igfoo/mb Warn about small amounts of MB, not GB Feb 26, 2025
@igfoo igfoo marked this pull request as ready for review February 26, 2025 15:30
@Copilot Copilot bot review requested due to automatic review settings February 26, 2025 15:30
@igfoo igfoo requested a review from a team as a code owner February 26, 2025 15:30

Choose a reason for hiding this comment

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

PR Overview

This PR changes the disk space warning message to display available disk space in MB instead of GB for better clarity with small amounts.

  • Updated disk space warning message in lib/util.js
  • Updated disk space warning message in src/util.ts

Reviewed Changes

File Description
lib/util.js Replaced GB values with MB in the disk usage warning message.
src/util.ts Replaced GB values with MB in the disk usage warning message.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

lib/util.js:828

  • The check still uses a threshold of 2 * gbInBytes while the message shows disk space in MB. For consistency, consider aligning the threshold with the displayed unit or adding a comment that explains the difference.
if (diskUsage.free < 2 * gbInBytes) {

src/util.ts:1059

  • The disk space threshold is still based on GB units, whereas the warning message now displays MB. Consider aligning the units for consistency if that is your intention.
if (diskUsage.free < 2 * gbInBytes) {

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

Makes sense, thank you!

@igfoo igfoo merged commit 97aac9b into main Feb 26, 2025
538 of 539 checks passed
@igfoo igfoo deleted the igfoo/mb branch February 26, 2025 16:56
@github-actions github-actions bot mentioned this pull request Mar 7, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants