Skip to content
This repository has been archived by the owner on Oct 21, 2019. It is now read-only.

Add /api/stats endpoint and github org stats generation #91

Merged
merged 1 commit into from
Mar 19, 2019

Conversation

bobheadxi
Copy link
Member

@bobheadxi bobheadxi commented Jul 29, 2018

I have some things in mind for the website

type OrgStats struct {
	Repositories int            `json:"repositories"`
	Stargazers   int            `json:"stargazers"`
	Topics       map[string]int `json:"topics"`
	Languages    map[string]int `json:"languages"`

	CommitTotal int               `json:"commit_total"`
	CommitGraph map[time.Time]int `json:"commit_graph"`
}

Sneak peek:

image

Pending #87

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.01%) to 37.247% when pulling a6fff54 on gh-stats into aa209cf on master.

Copy link
Member

@bfbachmann bfbachmann left a comment

Choose a reason for hiding this comment

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

Nice work! Can we hold off on merging this until master is stable again? I'd rather not put fresh code on top of a broken branch.

stats.Stargazers += r.GetStargazersCount()
stats.Languages[r.GetLanguage()]++
for _, t := range r.Topics {
stats.Topics[t]++
Copy link
Member

Choose a reason for hiding this comment

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

This looks okay, but we'll have to be careful about how we represent the Topics and Languages information on the front end, as we're counting the number of times each topic and language is used and we don't want to confuse that with the number of distinct topics and languages we use.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'm still considering various visualization options - I might not even include some of this in the website quite yet, since our repositories are typically pretty lacking as far as Topic tags go. I was thinking a distinct language count, as well as some sort of word cloud thing with our most popular languages/topics.

Copy link
Member

Choose a reason for hiding this comment

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

I really like the idea of showing off all the programming languages we use.

@bobheadxi
Copy link
Member Author

Yep, I'll hold off on merging this as I work on the website - I'll keep trying to tackle what's going on with master as well (not much progress on that front unfortunately)

@bobheadxi
Copy link
Member Author

with rocket2 up-and-coming, should be fine to just have this merged

@bobheadxi bobheadxi merged commit 0eb8ecf into master Mar 19, 2019
@bobheadxi bobheadxi deleted the gh-stats branch March 19, 2019 20:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants