(opts = {})
| 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(); |
nothing calls this directly
no test coverage detected