pages-gem icon indicating copy to clipboard operation
pages-gem copied to clipboard

Gem may fail if a user has a repository with many contributors

Open bkmgit opened this issue 1 year ago • 2 comments

Before submitting an issue, please be sure to

This issue affects

  • [x] The site generated by GitHub Pages
  • [ ] Building sites locally

The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.

What did you do (e.g., steps to reproduce)

Ran the Gem when generating a website at https://github.com/bkmgit/2024-05-06-uci-nnlm-online/tree/gh-pages with a fork of https://github.com/sched-ext/sched_ext in my userspace.

What did you expect to happen?

Expected the site to build.

What happened instead?

Site failed to build with log message:

Liquid Exception: GET https://api.github.com/repos/bkmgit/sched_ext/contributors?per_page=100: 403 - The history or contributor list is too large to list contributors for this repository via the API. // See: https://docs.github.com/rest/repos/repos#list-repository-contributors in /_layouts/base.html
/usr/local/bundle/gems/octokit-4.25.1/lib/octokit/response/raise_error.rb:14:in `on_complete': GET https://api.github.com/repos/bkmgit/sched_ext/contributors?per_page=100: 403 - The history or contributor list is too large to list contributors for this repository via the API. // See: https://docs.github.com/rest/repos/repos#list-repository-contributors (Octokit::Forbidden)

Error can be reproduced by calling

$ curl -L \
> -H "Accept: application/vnd.github+json" \
> -H "X-GitHub-Api-Version: 2022-11-28" \
> https://api.github.com/repos/sched_ext/sched_ext/contributors

Additional information

Initially reported at https://github.com/carpentries/workshop-template/issues/820

bkmgit avatar Apr 09 '24 05:04 bkmgit

Filed in the gem that caused this error: https://github.com/jekyll/github-metadata/issues/283

parkr avatar Apr 11 '24 06:04 parkr

Thanks.

bkmgit avatar Apr 12 '24 04:04 bkmgit