(opts = {})
| 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!'); |
no test coverage detected