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

Adding GitHub meta data #13

Open
mxstbr opened this issue Sep 19, 2015 · 5 comments
Open

Adding GitHub meta data #13

mxstbr opened this issue Sep 19, 2015 · 5 comments

Comments

@mxstbr
Copy link
Collaborator

mxstbr commented Sep 19, 2015

It would be nice if we could add GitHub meta data (e.g. stars, contributers, last commit time...) to the JSON file, that way we could show that information on postcss.parts and have some sorting options!

@mxstbr
Copy link
Collaborator Author

mxstbr commented Nov 24, 2015

How is this coming along? 👀

@himynameisdave
Copy link
Owner

Ummmmmmmmmmmmm.......

...yeah I've been super busy with other stuff man! I am getting to this because other people have requested similar stuff that would also require doing some things wth GitHub data.

@jonathantneal
Copy link
Collaborator

jonathantneal commented Nov 30, 2016

I’d love to contribute to this. Here’s some info on how it would be accomplished.

Collecting GitHub data is as simple as fetching the JSON of https://api.github.com/repos/${ user }/${ name }. From here, we can get the last updated time as Date.parse(updated_at), or we can get the number of forks as forks_count, the number of stars as stargazers_count, and the number of open issues as open_issues_count.

As a matter of relevancy, would we want to collect the last updated time from GitHub or from npm? The later matters a lot more to anyone using npm install.

We can also fetch the JSON of https://api.github.com/repos/${ user }/${ name }/contributors to get an Array of contributors, which includes their GitHub username as login, and their number of contributions as contributions.

@himynameisdave
Copy link
Owner

himynameisdave commented Nov 30, 2016

@jonathantneal this all sounds sensible to me, and we already grab stargazers_count from the GH API. For the 'Last Updated' field, I think the NPM option is better. I will create a todo-list for this issue:

  • Add forks field using forks_count from GH API
  • Add contributors array which lists all contributor's name and number_of_contributions (this should address Real authors in authors.md #47)
  • Add last_updated as the last date/time it was updated (from NPM)

Not sure if it's beneficial to add the number of open issues, but I'm okay with it, what is the value in adding that?

@himynameisdave
Copy link
Owner

Actually it looks like what you've proposed in #164 would clear a lot of this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants