bullgit.github.io icon indicating copy to clipboard operation
bullgit.github.io copied to clipboard

Show contributors of repos

Open dervondenbergen opened this issue 10 years ago • 11 comments

Show below (aside) every repo the people, who contribute to that specific repo. Like the maker section on something on producthunt.

dervondenbergen avatar Jan 28 '16 08:01 dervondenbergen

What about the bullgit.github.io repo, won't that have a lot more contributors than the others and mess up the layout?

ideas:

  • ...
  • click to see more
  • +

Haroenv avatar Jan 28 '16 08:01 Haroenv

We can make it scrollable like on producthunt :D

On 28 Jan 2016, at 09:17, Haroen Viaene [email protected] wrote:

What about the bullgit.github.io repo, won't that have a lot more contributors than the others and mess up the layout?

— Reply to this email directly or view it on GitHub.

dervondenbergen avatar Jan 28 '16 08:01 dervondenbergen

This isn't returned by the jekyll-github-metadata. It does however return this:

{{repo.contributors_url}}, which returns https://api.github.com/repos/bullgit/bullgit.github.io/contributors, and that contains for example this:

[
  {
    "login": "Haroenv",
    "id": 6270048,
    "avatar_url": "https://avatars.githubusercontent.com/u/6270048?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/Haroenv",
    "html_url": "https://github.com/Haroenv",
    "followers_url": "https://api.github.com/users/Haroenv/followers",
    "following_url": "https://api.github.com/users/Haroenv/following{/other_user}",
    "gists_url": "https://api.github.com/users/Haroenv/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/Haroenv/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/Haroenv/subscriptions",
    "organizations_url": "https://api.github.com/users/Haroenv/orgs",
    "repos_url": "https://api.github.com/users/Haroenv/repos",
    "events_url": "https://api.github.com/users/Haroenv/events{/privacy}",
    "received_events_url": "https://api.github.com/users/Haroenv/received_events",
    "type": "User",
    "site_admin": false,
    "contributions": 68
  },
  {
    "login": "dervondenbergen",
    "id": 2054024,
    "avatar_url": "https://avatars.githubusercontent.com/u/2054024?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/dervondenbergen",
    "html_url": "https://github.com/dervondenbergen",
    "followers_url": "https://api.github.com/users/dervondenbergen/followers",
    "following_url": "https://api.github.com/users/dervondenbergen/following{/other_user}",
    "gists_url": "https://api.github.com/users/dervondenbergen/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/dervondenbergen/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/dervondenbergen/subscriptions",
    "organizations_url": "https://api.github.com/users/dervondenbergen/orgs",
    "repos_url": "https://api.github.com/users/dervondenbergen/repos",
    "events_url": "https://api.github.com/users/dervondenbergen/events{/privacy}",
    "received_events_url": "https://api.github.com/users/dervondenbergen/received_events",
    "type": "User",
    "site_admin": false,
    "contributions": 58
  },
  {
    "login": "LukyVj",
    "id": 1630200,
    "avatar_url": "https://avatars.githubusercontent.com/u/1630200?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/LukyVj",
    "html_url": "https://github.com/LukyVj",
    "followers_url": "https://api.github.com/users/LukyVj/followers",
    "following_url": "https://api.github.com/users/LukyVj/following{/other_user}",
    "gists_url": "https://api.github.com/users/LukyVj/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/LukyVj/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/LukyVj/subscriptions",
    "organizations_url": "https://api.github.com/users/LukyVj/orgs",
    "repos_url": "https://api.github.com/users/LukyVj/repos",
    "events_url": "https://api.github.com/users/LukyVj/events{/privacy}",
    "received_events_url": "https://api.github.com/users/LukyVj/received_events",
    "type": "User",
    "site_admin": false,
    "contributions": 24
  },
 ...
]

related: https://github.com/jekyll/github-metadata/issues/26

Haroenv avatar Jan 28 '16 13:01 Haroenv

So this is possible if we either somehow cache it, or if we get jekyll-github-metadata somewhere else serverside, add the contributors and link them to our members.yml

or an option could be to add projects you've worked on in members.yml or make projects.yml (but I don't really like that option).

Haroenv avatar Mar 09 '16 08:03 Haroenv

We could write a little service, which generates some useful JSON, or a projects.yaml, and push that to the repo periodically. We can then simply use the data like the members data normally in Jekyll.

As a side effect that will also solve our problem with the site being outdated, if a new repo gets created, because there is a push from time to time.

On 09 Mar 2016, at 09:00, Haroen Viaene [email protected] wrote:

So this is possible if we either somehow cache it, or if we get jekyll-github-metadata somewhere else serverside, add the contributors and link them to our members.yml

or an option could be to add projects you've worked on in members.yml or make projects.yml (but I don't really like that option).

— Reply to this email directly or view it on GitHub.

dervondenbergen avatar Mar 09 '16 08:03 dervondenbergen

As a reference here I'll write what we want:

  • each repository
    • name
    • description
    • url
    • has_pages
    • date created
    • stars
    • contributors
      • avatar
      • name
      • lines changed / commits (to sort)

We can get this info with curl -i https://api.github.com/orgs/bullgit/repos (but it needs to be paginated)

Haroenv avatar Mar 09 '16 08:03 Haroenv

What? Why do we need anything beside the name and contibutors of the repo. The rest is already provided by github itself, the way we are using it right now.

dervondenbergen avatar Mar 09 '16 12:03 dervondenbergen

then we could loop in that file instead of site.github

Haroenv avatar Mar 09 '16 16:03 Haroenv

Hmmm, good point, so we will just make a better site.github. Not bad idea

dervondenbergen avatar Mar 09 '16 18:03 dervondenbergen

Dear all, Is there any news on that topic ? I'm still trying to loop on a site.github.public_repositories in order to show all repositories with their contributors but without success so far. Thanks

nservant avatar Nov 14 '20 18:11 nservant

Sorry @nservant we haven't tried this since 5 years ago

Haroenv avatar Nov 16 '20 08:11 Haroenv