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

Method prCommentUpdate

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

Source from the content-addressed store, hash-verified

419 }
420
421 async prCommentUpdate(opts = {}) {
422 const projectPath = await this.projectPath();
423 const { report, prNumber, id: commentId } = opts;
424
425 if (report.length >= MAX_COMMENT_SIZE) throw new Error(ERROR_COMMENT_SIZE);
426
427 const endpoint = `/projects/${projectPath}/merge_requests/${prNumber}/notes/${commentId}`;
428 const body = new URLSearchParams();
429 body.append('body', report);
430
431 const { id } = await this.request({
432 endpoint,
433 method: 'PUT',
434 body
435 });
436
437 return `${this.repo}/-/merge_requests/${prNumber}#note_${id}`;
438 }
439
440 async prComments(opts = {}) {
441 const projectPath = await this.projectPath();

Callers

nothing calls this directly

Calls 2

projectPathMethod · 0.95
requestMethod · 0.95

Tested by

no test coverage detected