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

Method commitCommentCreate

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

Source from the content-addressed store, hash-verified

71 }
72
73 async commitCommentCreate(opts = {}) {
74 const { commitSha, report } = opts;
75
76 if (report.length >= MAX_COMMENT_SIZE) throw new Error(ERROR_COMMENT_SIZE);
77
78 const projectPath = await this.projectPath();
79 const endpoint = `/projects/${projectPath}/repository/commits/${commitSha}/comments`;
80 const body = new URLSearchParams();
81 body.append('note', report);
82
83 await this.request({ endpoint, method: 'POST', body });
84
85 return `${this.repo}/-/commit/${commitSha}`;
86 }
87
88 async commitCommentUpdate(opts = {}) {
89 throw new Error('GitLab does not support comment updates!');

Callers 3

github.e2e.test.jsFile · 0.45
gitlab.e2e.test.jsFile · 0.45

Calls 2

projectPathMethod · 0.95
requestMethod · 0.95

Tested by

no test coverage detected