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

Function appendEntry

actions/setup/js/github_rate_limit_logger.cjs:54–62  ·  view source on GitHub ↗

* Append a single rate-limit entry to the JSONL log file. * Errors are non-fatal – a warning is emitted to the Actions log. * * @param {Record } entry

(entry)

Source from the content-addressed store, hash-verified

52 * @param {Record<string, unknown>} entry
53 */
54function appendEntry(entry) {
55 try {
56 ensureDir(GITHUB_RATE_LIMITS_JSONL_PATH);
57 const line = JSON.stringify(entry) + "\n";
58 fs.appendFileSync(GITHUB_RATE_LIMITS_JSONL_PATH, line);
59 } catch (err) {
60 core.warning(`github_rate_limit_logger: failed to write entry: ${getErrorMessage(err)}`);
61 }
62}
63
64/**
65 * Parse an x-ratelimit-reset Unix timestamp (seconds) into an ISO 8601 string.

Callers 3

logRateLimitFromResponseFunction · 0.85
fetchAndLogRateLimitFunction · 0.85
logRetryEventFunction · 0.85

Calls 2

ensureDirFunction · 0.85
getErrorMessageFunction · 0.70

Tested by

no test coverage detected