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