MCPcopy
hub / github.com/gitalk/gitalk / getIssue

Method getIssue

src/gitalk.jsx:256–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254 })
255 }
256 getIssue () {
257 const { number } = this.options
258 const { issue } = this.state
259 if (issue) {
260 this.setState({ isNoInit: false })
261 return Promise.resolve(issue)
262 }
263
264 if (typeof number === 'number' && number > 0) {
265 return this.getIssueById().then(resIssue => {
266 if (!resIssue) return this.getIssueByLabels()
267 return resIssue
268 })
269 }
270 return this.getIssueByLabels()
271 }
272 createIssue () {
273 const { owner, repo, title, body, id, labels, url } = this.options
274 return axiosGithub.post(`/repos/${owner}/${repo}/issues`, {

Callers 3

getInitMethod · 0.95
GitalkComponentClass · 0.95
createCommentMethod · 0.95

Calls 2

getIssueByIdMethod · 0.95
getIssueByLabelsMethod · 0.95

Tested by

no test coverage detected