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

Method createIssue

src/gitment.js:152–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150 }
151
152 createIssue() {
153 const { id, owner, repo, title, link, desc, labels } = this
154
155 return http.post(`/repos/${owner}/${repo}/issues`, {
156 title,
157 labels: labels.concat(['gitment', id]),
158 body: `${link}\n\n${desc}`,
159 })
160 .then((meta) => {
161 this.state.meta = meta
162 return meta
163 })
164 }
165
166 getIssue() {
167 if (this.state.meta.id) return Promise.resolve(this.state.meta)

Callers 1

initMethod · 0.95

Calls 1

postMethod · 0.80

Tested by

no test coverage detected