github / github/pages-gem

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

Open
#915 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
1.9k
Forks
360
PR merge metrics
No merged PRs in 30d

Description

### Before submitting an issue, please be sure to

- [x] Read [the contributing instructions](https://github.com/github/pages-gem/blob/master/docs/CONTRIBUTING.md#contributing-to-the-github-pages-gem)
- [x] Update to the latest Gem version (run `bundle update github-pages`)

### 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](https://github.com/github/pages-gem/blob/master/docs/SUPPORT.md).*

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.