feat: add rate-limit retry/backoff handling in Gitea API client #145
Reference in New Issue
Block a user
Delete Branch "feature/rate-limit-retry-132"
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?
Summary
doRequestfor HTTP 429 (Too Many Requests) responsesRetry-Afterheader when present, fall back to exponential backoff (1s, 2s, 4s)maxRetries(default 3) andbaseRetryDelay(default 1s) on Client structCloses #132
Test plan
go test ./internal/gitea/ -run TestDoRequest_RateLimit- all passgo test ./internal/gitea/ -run TestRetryDelay- all passgo test ./internal/gitea/- all existing tests still pass