-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix: Getting the size from github rest api #38
Conversation
…unction (github repo size comes in KB)
Theoritically this makes sense, however, the size returned by that API call is inaccurate. I'm getting 1.19MB as total size. The current implementation with this repo as test subject at least results in an accurate decompressed main branch download size. Neither implementation at the moments take into account other branches. To replicate:
|
@AminoffZ i think the truth lies somewhere in the middle the api call gives me 2.19 MB, the file size counter gives 1.31 MB, same time downloading and decompressing gives 1.30 MB and cloning gives 3.3MB, so i find it weird that one set of files on one specific branch that hasn't changed has so many changing size values based on the download/calculation method, what should we do? |
I think the size return from API is counting all the storage space taken on github. It is not only counting the default branch file sizes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLDR: User Value from current implementation > suggested change.
- Until we can reliably fetch / calculate the clone size, we should show source code folder size (current implementation).
- When we have clone size, we could show both (UI suggestions welcome)
Closes #31