Skip to content

Add GitHub repo size badge to README#12

Open
murpii wants to merge 1 commit into
ddnet:masterfrom
murpii:patch-1
Open

Add GitHub repo size badge to README#12
murpii wants to merge 1 commit into
ddnet:masterfrom
murpii:patch-1

Conversation

@murpii

@murpii murpii commented Jul 8, 2026

Copy link
Copy Markdown
Member

No description provided.

@def- def- left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's not an official GitHub feature and so gives away user info to shields.io. Otherwise lgtm.
Can't we just write "Repo size is > 1 GiB" and that's good enough?

@murpii

murpii commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

It's not an official GitHub feature and so gives away user info to shields.io. Otherwise lgtm. Can't we just write "Repo size is > 1 GiB" and that's good enough?

An alternative would be to generate a badge ourselves through a GitHub Action and commit the resulting SVG to the repository.

I mirrored a possible implementation on my fork to demonstrate how this could work.

or...

Since @ddnet-maps automatically updates the repository anyway, maybe we can hook it up there instead?

@murpii

murpii commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Probably don't even need to generate a badge like I did and update just the readme.md via GitHub Actions.

  run: |
    SIZE=$(curl -s https://api.github.com/repos/${{ github.repository }} | jq -r '.size' | awk '{printf "%.2f MiB", $1/1024}')
    sed -i "s/^Repository size:.*/Repository size: $SIZE/" README.md

@def-

def- commented Jul 8, 2026

Copy link
Copy Markdown
Member

Yeah, both of those work without relying on any extra services. Kind of a minor thing, so if you like we can also merge this PR.

@murpii

murpii commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

@def- I went with option B. @ddnet-maps should update the download sizes for the ZIP and git pull option on the next run after merging this and the build-map.sh PR.

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