Skip to content

Commit

Permalink
[Fix] Case for same SHA for tag/commit (getTag error)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtouzy committed Oct 24, 2022
1 parent 3a82bc4 commit f62b9f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helpers/Git.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ module.exports = class Git {
return self.octokit
.git
.getTag(Object.assign({ tag_sha: responseData.object.sha }, self.repo))
.catch(() => {
// NOTE: If it's the same, the catch will just return the same SHA, without the GET /Tag
return { data: { object: { sha: responseData.object.sha } } }
})
})
.then(responseData => {
return self.octokit
Expand Down

0 comments on commit f62b9f1

Please sign in to comment.