Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34215

Disable rate_limit check for GitHub Enterprise

XMLWordPrintable

      As GitHub Enterprise does not enforce rate limiting, requests to https://hostname/api/v3/rate_limit will return a 404 Not Found status code.

      Based on https://github.com/kohsuke/github-api/blob/d30b0403ceb06c71dc9b099352fb9f03045772aa/src/main/java/org/kohsuke/github/GitHub.java#L257 there is a check, and then the rate limit is set to an arbitrary high number. On very busy systems this results in tens of thousands of requests per hour to the GitHub Enterprise appliance. Although returning a 404 is a relatively simple operation, there are other things such as logging that are impacted by the volume of requests.

      A better method would be to look for /api/v3/ within the API URL, and then simply skip the rate limit check altogether. /api/v3/ is unique to GitHub Enterprise, so this will not have any impact on the GitHub.com rate limit endpoint of https://api.github.com/rate_limit

            lanwen Kirill Merkushev
            djdefi Ryan Trauntvein
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: