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

Function sanitizeMemoryID

actions/setup/js/comment_memory.cjs:29–36  ·  view source on GitHub ↗
(memoryID)

Source from the content-addressed store, hash-verified

27}
28
29function sanitizeMemoryID(memoryID) {
30 const normalized = String(memoryID || "default").trim();
31 if (!/^[a-zA-Z0-9_-]+$/.test(normalized)) {
32 core.info(`comment_memory: rejected invalid memory_id '${normalized}'`);
33 return null;
34 }
35 return normalized;
36}
37
38function buildManagedMemoryBody(rawBody, memoryID, options) {
39 const { includeFooter, runUrl, workflowName, workflowSource, workflowSourceURL, historyUrl, triggeringIssueNumber, triggeringPRNumber } = options;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected