MCPcopy
hub / github.com/imsun/gitment / post

Method post

src/gitment.js:172–183  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

170 }
171
172 post(body) {
173 return this.getIssue()
174 .then(issue => http.post(issue.comments_url, { body }, ''))
175 .then(data => {
176 this.state.meta.comments++
177 const pageCount = Math.ceil(this.state.meta.comments / this.perPage)
178 if (this.state.currentPage === pageCount) {
179 this.state.comments.push(data)
180 }
181 return data
182 })
183 }
184
185 loadMeta() {
186 const { id, owner, repo } = this

Callers 6

constructorMethod · 0.80
markdownMethod · 0.80
createIssueMethod · 0.80
likeMethod · 0.80
likeACommentMethod · 0.80
renderEditorFunction · 0.80

Calls 1

getIssueMethod · 0.95

Tested by

no test coverage detected