(branchName: string)
| 1330 | } |
| 1331 | |
| 1332 | deleteBranch(branchName: string) { |
| 1333 | return this.deleteRef('heads', branchName).catch((err: Error) => { |
| 1334 | // If the branch doesn't exist, then it has already been deleted - |
| 1335 | // deletion should be idempotent, so we can consider this a |
| 1336 | // success. |
| 1337 | if (err.message === 'Reference does not exist') { |
| 1338 | return Promise.resolve(); |
| 1339 | } |
| 1340 | console.error(err); |
| 1341 | return Promise.reject(err); |
| 1342 | }); |
| 1343 | } |
| 1344 | |
| 1345 | async getHeadReference(head: string) { |
| 1346 | return `${this.repoOwner}:${head}`; |
no test coverage detected