diff --git a/lib/get-commit.js b/lib/get-commit.js index 5352859a..c7157dbf 100644 --- a/lib/get-commit.js +++ b/lib/get-commit.js @@ -11,7 +11,7 @@ function getCommit (state) { .then(function (result) { const {filename, patch, blob_url: blobUrl} = result.data.files[0] - var branchUrl = blobUrl.replace(/(?:blob)(.+)(?=\/)/g, 'blob/' + state.repoDefaultBranch) + var branchUrl = blobUrl.replace(/(?:blob\/)(\w+)/g, 'blob/' + state.repoDefaultBranch) state.commit = { message: result.data.commit.message,