Leo Lamprecht
8 years ago
No known key found for this signature in database
GPG Key ID: B08517883D5E0E10
1 changed files with
8 additions and
3 deletions
-
lib/github.js
|
|
@ -44,10 +44,15 @@ const splittedURL = fullURL => { |
|
|
|
// ...and then remove it from the parts
|
|
|
|
pathParts.splice(0, 2) |
|
|
|
|
|
|
|
return { |
|
|
|
main, |
|
|
|
ref: pathParts.length >= 2 ? pathParts[1] : '' |
|
|
|
// Assign Git reference
|
|
|
|
let ref = pathParts.length >= 2 ? pathParts[1] : '' |
|
|
|
|
|
|
|
// Shorten SHA for commits
|
|
|
|
if (pathParts[0] && pathParts[0] === 'commit') { |
|
|
|
ref = ref.substring(0, 7) |
|
|
|
} |
|
|
|
|
|
|
|
return {main, ref} |
|
|
|
} |
|
|
|
|
|
|
|
export const gitPathParts = main => { |
|
|
|