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

Method add

actions/setup/js/log_parser_shared.cjs:98–111  ·  view source on GitHub ↗

* Adds content to the tracker and returns whether the limit has been reached. * @param {string} content - Content to add * @returns {boolean} True if the content was added, false if the limit was reached

(content)

Source from the content-addressed store, hash-verified

96 * @returns {boolean} True if the content was added, false if the limit was reached
97 */
98 add(content) {
99 if (this.limitReached) {
100 return false;
101 }
102
103 const contentSize = Buffer.byteLength(content, "utf8");
104 if (this.currentSize + contentSize > this.maxSize) {
105 this.limitReached = true;
106 return false;
107 }
108
109 this.currentSize += contentSize;
110 return true;
111 }
112
113 /**
114 * Checks if the limit has been reached.

Callers 15

artifactListFilterLatestFunction · 0.45
parseFirewallAuthErrorsFunction · 0.45
extractMCPGatewayTokensFunction · 0.45
parseAllowedBaseBranchesFunction · 0.45
mainFunction · 0.45
createMCPServerFunction · 0.45

Calls

no outgoing calls

Tested by 7

canonicalPatchPathFunction · 0.36
canonicalBundlePathFunction · 0.36
trackCwdArtifactFunction · 0.36
canonicalPatchPathFunction · 0.36
canonicalBundlePathFunction · 0.36
collectTransitiveDepsFunction · 0.36
shouldRegisterToolFunction · 0.36