(branchName: string)
| 1343 | } |
| 1344 | |
| 1345 | deleteBranch(branchName: string) { |
| 1346 | return this.deleteRef('heads', branchName).catch((err: Error) => { |
| 1347 | // If the branch doesn't exist, then it has already been deleted - |
| 1348 | // deletion should be idempotent, so we can consider this a |
| 1349 | // success. |
| 1350 | if (err.message === 'Reference does not exist') { |
| 1351 | return Promise.resolve(); |
| 1352 | } |
| 1353 | console.error(err); |
| 1354 | return Promise.reject(err); |
| 1355 | }); |
| 1356 | } |
| 1357 | |
| 1358 | async getHeadReference(head: string) { |
| 1359 | return `${this.repoOwner}:${head}`; |
no test coverage detected