()
| 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`, { |
| 275 | title, |
| 276 | labels: labels.concat(id), |
| 277 | body: body || `${url} \n\n ${ |
| 278 | getMetaContent('description') || |
| 279 | getMetaContent('description', 'og:description') || '' |
| 280 | }` |
| 281 | }, { |
| 282 | headers: { |
| 283 | Authorization: `token ${this.accessToken}` |
| 284 | } |
| 285 | }).then(res => { |
| 286 | this.setState({ issue: res.data }) |
| 287 | return res.data |
| 288 | }) |
| 289 | } |
| 290 | // Get comments via v3 api, don't require login, but sorting feature is disable |
| 291 | getCommentsV3 = issue => { |
| 292 | const { clientID, clientSecret, perPage } = this.options |
no test coverage detected