MCPcopy Create free account
hub / github.com/github/gh-aw / wrapper

Function wrapper

actions/setup/js/github_rate_limit_logger.cjs:248–252  ·  view source on GitHub ↗
(/** @type {any[]} */ ...args)

Source from the content-addressed store, hash-verified

246 const fn = target[method];
247 if (typeof fn !== "function") return fn;
248 const wrapper = async (/** @type {any[]} */ ...args) => {
249 const response = await fn.apply(target, args);
250 logRateLimitFromResponse(response, `${namespaceName}.${String(method)}`);
251 return response;
252 };
253 // Wrap the wrapper in a Proxy so that Octokit-specific property accesses
254 // (e.g. .endpoint, used by github.paginate()) fall back to the original fn.
255 // Without this, github.paginate(github.rest.checks.listForRef, ...) throws

Callers

nothing calls this directly

Calls 1

logRateLimitFromResponseFunction · 0.85

Tested by

no test coverage detected