mirror of
https://github.com/CaddyBuilds/caddy-cloudflare.git
synced 2026-04-26 12:35:55 +03:00
[PR #23] [MERGED] Add GitHub API authentication to avoid rate limit errors #25
Labels
No labels
documentation
pull-request
question
stale
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/caddy-cloudflare#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CaddyBuilds/caddy-cloudflare/pull/23
Author: @r4y7s
Created: 10/16/2025
Status: ✅ Merged
Merged: 12/7/2025
Merged by: @vkartk
Base:
main← Head:feature/github-rate-limit📝 Commits (3)
096967fUpdate check_caddy_status.pyc571158Update check-caddy-release.yml44edc92Update check_caddy_status.py📊 Changes
2 files changed (+9 additions, -7 deletions)
View changed files
📝
.github/workflows/check-caddy-release.yml(+1 -0)📝
scripts/check_caddy_status.py(+8 -7)📄 Description
Problem
The script makes unauthenticated requests to the GitHub API, which causes 403 rate limit errors when running frequently in CI/CD:
Example: https://github.com/CaddyBuilds/caddy-cloudflare/actions/runs/18362086185
Unauthenticated requests are limited to 60/hour, while authenticated requests get 5,000/hour.
Solution
Added support for the
GITHUB_TOKENenvironment variable to authenticate requests. The script falls back gracefully to unauthenticated requests if the token is not provided.Usage
In GitHub Actions workflows:
The
GITHUB_TOKENis automatically provided by GitHub Actions and requires no additional configuration.Changes
GITHUB_TOKENfrom environmentAuthorizationheader when token is availableThis is fully backward compatible and eliminates rate limit issues.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.