Skip to content

Commit

Permalink
Updated new blobUrl to link to correct page
Browse files Browse the repository at this point in the history
  • Loading branch information
Techforchange committed Sep 28, 2017
1 parent 6c4dbf3 commit b717980
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/get-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ function getCommit (state) {

.then(function (result) {
const {filename, patch, blob_url} = result.data.files[0]
var newBlobUrl = blob_url.replace(/(?:blob)(.+)(?=\/)/g, 'blob/' + state.branch)

state.commit = {
message: result.data.commit.message,
filename,
patch,
blobUrl: blob_url
blobUrl: newBlobUrl
}

state.debug(`found commit "${state.commit.message}". Changed file "${filename}"`)
state.debug(`found commit "${state.commit.message}". Changed file "${filename}" Found newBlobUrl "${state.commit.blobUrl}"`)
})
}

0 comments on commit b717980

Please sign in to comment.