Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
mfix22 committed Aug 24, 2020
1 parent dde1773 commit f079085
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/pull/merged.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ module.exports.deleteBranch = () => async (context) => {

return executeAction(action, {
[DELETE_BRANCH]: () => {
const ref = `heads/${thread.head.ref}`

return context.github.gitdata.deleteRef(context.repo({ ref })).catch((e) => {
// TODO this is because GitHub has already deleted the reference
if (e.message !== 'Reference does not exist') {
throw e
}
})
return context.github.gitdata
.deleteRef(context.repo({ ref: `heads/${thread.head.ref}` }))
.catch((e) => {
// TODO this is because GitHub has already deleted the reference
if (e.message !== 'Reference does not exist') {
throw e
}
})
},
})
})
Expand Down

0 comments on commit f079085

Please # to comment.