MCPcopy
hub / github.com/iterative/cml / prCommentCreate

Method prCommentCreate

src/drivers/gitlab.js:402–419  ·  view source on GitHub ↗
(opts = {})

Source from the content-addressed store, hash-verified

400 }
401
402 async prCommentCreate(opts = {}) {
403 const projectPath = await this.projectPath();
404 const { report, prNumber } = opts;
405
406 if (report.length >= MAX_COMMENT_SIZE) throw new Error(ERROR_COMMENT_SIZE);
407
408 const endpoint = `/projects/${projectPath}/merge_requests/${prNumber}/notes`;
409 const body = new URLSearchParams();
410 body.append('body', report);
411
412 const { id } = await this.request({
413 endpoint,
414 method: 'POST',
415 body
416 });
417
418 return `${this.repo}/-/merge_requests/${prNumber}#note_${id}`;
419 }
420
421 async prCommentUpdate(opts = {}) {
422 const projectPath = await this.projectPath();

Callers

nothing calls this directly

Calls 2

projectPathMethod · 0.95
requestMethod · 0.95

Tested by

no test coverage detected