diff --git a/helpers/Git.js b/helpers/Git.js index f4b3417..f176eec 100644 --- a/helpers/Git.js +++ b/helpers/Git.js @@ -56,12 +56,15 @@ module.exports = class Git { .getRef(Object.assign({ ref: `tags/${tag}` }, this.repo)) .then(this.responseHandler) .then(responseData => { - const ref = { - sha: responseData.object.sha - } + // NOTE: This is necessary because the tag-ref SHA can be different from associated commit SHA + return self.octokit + .git + .getTag(Object.assign({ tag_sha: responseData.object.sha }, self.repo)) + }) + .then(responseData => { return self.octokit .git - .getCommit(Object.assign({ commit_sha: ref.sha }, self.repo)) + .getCommit(Object.assign({ commit_sha: responseData.data.object.sha }, self.repo)) }) .then(this.responseHandler) .then(responseData => { diff --git a/package.json b/package.json index 82ca287..83c15ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pictarine/release-note-now", - "version": "1.0.7", + "version": "1.0.8", "description": "Automatic release note generator for GitHub projects", "main": "index.js", "scripts": {