MCPcopy Create free account
hub / github.com/alibaba/open-code-review / add

Function add

scripts/github-actions/post-review-comments.test.js:304–308  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

302 if (opts.echoPosted || opts.landedKeys) {
303 const byId = new Map();
304 const add = (c) => {
305 const m = /<!--\s*(ocr-\d+-\d+-[a-f0-9]+)\s*-->/.exec(c.body || "");
306 const k = m ? m[1] : `${c.path}|${c.start_line != null ? c.start_line : "-"}|${c.line != null ? c.line : "-"}|${c.body}`;
307 if (!byId.has(k)) byId.set(k, c);
308 };
309 if (opts.echoPosted) {
310 const posted = batchPostedComments();
311 const n = opts.postedCount != null ? opts.postedCount : posted.length;

Callers 1

makeGithubFunction · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected