jekyll / github-metadata

Jekyll plugin to propagate the `site.github` namespace and set default values for use with GitHub Pages.

Home Page:https://jekyll.github.io/github-metadata/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

any plan to implement site.github.public_repositories[].contributors ?

9bow opened this issue · comments

Hello,

I'm running a GitHub organization, and I would like to publish contributor list of all public repos in organization to our website.

In this regard, I was expecting the following code, but the field site.github.public_repositories[].contributors was not exist.

{% for repository in site.github.public_repositories %}
  ## [{{ repository.name }}]({{ repository.html_url }})
  {% for contributor in repository.contributors %}
    * [{{ contributor.name }}]({{ contributor.html_url }})
  {% endfor %}
{% endfor %}

I found an old similar issue with this feature, but it seems to have been resolved by fetching only the contributors of only one repository (the current repository specified in _config.yaml) as site.github.contributors.

It looks like the GitHub API and octokit.rb support the feature to get a list of contributors by repository.

However, I'm a bit embarrassed because I haven't written code in ruby. 😅

Do you have any plans to add a feature related to this?

Thank you.

New feature added as PR (#234) to close this issue.
This feature has been merged with the dedicated help of maintainer @parkr.
With his review, this PR was a great experience for me. :)

Thank you for the contribution, @9bow!