Repository navigation
feat(portfolio): a page and a badge for each organization - #347
Merged
Merged
Conversation
The 200 organizations with the most commits in the last 12 months get orgs/<domain>.html, with their commits to each repository of the portfolio and the markup of their badge, orgs/<domain>.svg, with a shields.io endpoint next to it. The Organizations page links to them, and the Gallery's sitemap lists them.
✅ Deploy Preview for shenxianpeng-gitstats ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Each organization gets a page of its own and a badge to show it, the way committers.top gives every ranked user and organization a badge: something an organization's open source program or developer relations team can put on its own pages, and a reason for it to link back.
What changes
orgs/<domain>.htmlfor the 200 organizations with the most commits in the last 12 months (the order oforganizations.json): a one-line rule of how commits are counted, tiles (commits in the last 12 months, repositories, all commits since the first), a table of its commits to each repository linking to that repository's Authors page, and its badge with the Markdown to copy.orgs/<domain>.svg, a badge in the report's style:<portfolio title> | 1.2k commits to 12 projects in 12 months(all of them when it has none in the last 12 months), andorgs/<domain>.json, a shields.io endpoint for other styles. Made again with every build, so it stays current.organizations.jsongetsby_repository(commits, last 12 months, addresses, first and last commit per repository).sitemap.xml.[a-z0-9-]labels with dots) gets files, and_open_portfolio_fileaccepts onlyorgs/<domain>.(html|svg|json), so a name can't write outsideorgs/.Only organizations get pages: domains one person commits from were already counted apart in #345, so no page is about a person.
Before / After (改动前 / 改动后)
A portfolio of four real repositories (FastAPI, Django, git, pytorch/vision), title "GitStats Gallery", with the Gallery's address.
Organizations page: names now link to their pages
The new organization page,
orgs/google.com.html(there was none before)Neither page scrolls sideways on a phone: 390 px wide at 390 px.
The badge
Output files
orgs/<domain>.html, 144 for these four repositories (up to 200)orgs/<domain>.svgandorgs/<domain>.jsonfor eachorganizations.jsonper organizationby_repositoryTests
📚 Documentation preview 📚: https://gitstats--347.org.readthedocs.build/