()
| 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`, { |
no test coverage detected