Limit and/or Cache API requests to avoid: 403 - API rate limit exceeded for installation ID ___
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with the jekyll-github-metadata gem's GitHub Metadata generation and the verbose build output showing list_repos, releases, and contributors calls. Reproduce the GitHub Actions deployment with Jekyll 4.3.2 and GITHUB_TOKEN, then inspect how these requests are made. Done means deployments avoid unnecessary requests and complete without exceeding the installation rate limit.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I just switched to using Jekyll 4.3.2 and tried to deploy a static site using this theme, which lists all current GitHub repositories on the generated static site page. To do this, it uses jekyll-github-metadata gem (version 2.16.0) to gather all repositories for my GitHub user.
Apparently, this results in a lot of API requests (for my user, over ~486!) and quickly hits the rate limit when using GITHUB_TOKEN in a GitHub Actions workflow.
Would it be possible to cache or limit API requests further so static site deployments will complete successfully in GitHub Actions?
For example: The jekyll build --verbose output shows each repo is queried for both contributors and releases, but the template doesn't even need this information
Logging at level: debug
Jekyll Version: 4.3.2
Configuration file: /mnt/terabyte/src/sites/trinitronx.github.io/_config.yml
Configuration file: /mnt/terabyte/src/sites/trinitronx.github.io/_config_dev.yml
Requiring: jekyll-github-metadata
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
GitHub Metadata: Initializing...
Source: /mnt/terabyte/src/sites/trinitronx.github.io
Destination: /mnt/terabyte/src/sites/trinitronx.github.io/_site
Incremental build: enabled
Generating...
Reading: /_layouts/default.html
EntryFilter: excluded /LICENSE.neumorphism
EntryFilter: excluded /README.md
EntryFilter: excluded /docs
EntryFilter: excluded /package.json
EntryFilter: excluded /node_modules
EntryFilter: excluded /.jekyll-cache
EntryFilter: excluded /.github
EntryFilter: excluded /.ruby-version
EntryFilter: excluded /Gemfile
EntryFilter: excluded /yarn.lock
EntryFilter: excluded /.ruby-gemset
EntryFilter: excluded /Gemfile.lock
EntryFilter: excluded /.gitignore
EntryFilter: excluded /gulpfile.js
Reading: index.html
Reading: _data/projects.yml
Reading: _data/skills-frameworks.yml
Reading: _data/skills-languages.yml
Reading: _data/skills-tools.yml
Reading: _data/timeline.yml
Rendering: index.html
Pre-Render Hooks: index.html
Rendering Markup: index.html
Post-Convert Hooks: index.html
Rendering Layout: index.html
GitHub Metadata: Generating for trinitronx/trinitronx.github.io
GitHub Metadata: Calling @client.list_repos("trinitronx", {:type=>"public", :accept=>"application/vnd.github.mercy-preview+json"})
GitHub Metadata: Calling @client.releases("trinitronx/action-doctl")
GitHub Metadata: Calling @client.contributors("trinitronx/action-doctl")
GitHub Metadata: Calling @client.releases("trinitronx/ansible")
GitHub Metadata: Calling @client.contributors("trinitronx/ansible")
GitHub Metadata: Calling @client.releases("trinitronx/ansible-examples")
GitHub Metadata: Calling @client.contributors("trinitronx/ansible-examples")
[... SNIP ...]
[... TOTAL number of releases + contributors API log lines = 486 ...]
[... SNIP ...]
GitHub Metadata: Calling @client.releases("trinitronx/zengge-lightcontrol")
GitHub Metadata: Calling @client.contributors("trinitronx/zengge-lightcontrol")
Writing: /mnt/terabyte/src/sites/trinitronx.github.io/_site/index.html
Writing Metadata: .jekyll-metadata
done in 177.699 seconds.
Auto-regeneration: disabled. Use --watch to enable.
[18:31:02] Finished 'jekyll' after 2.97 min
- Ngôn ngữ chính
- Ruby
- Star
- 309
- Fork
- 159
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jekyll/github-metadata
-
jekyll-github-metadata calls Pages API for private repos with Pages disabled, causing fatal 403Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
jekyll/github-metadata#302 ·
-
PageĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
jekyll/github-metadata#294 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
jekyll/github-metadata#290 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
jekyll/github-metadata#264 · 1 bình luận · 3 reaction ·
-
Latest Commit Date for FileĐang mởpinned
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
jekyll/github-metadata#130 · 5 bình luận · 6 reaction ·
Tất cả issue của jekyll/github-metadata
Issue tương tự
-
Remove sidekiq trace filteringĐang mởinstrumentation-sidekiq
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
open-telemetry/opentelemetry-ruby-contrib#2735 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raisingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
ruby/securerandom#92 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
we-promise/sure#5902 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
avo-hq/avo#5065 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày