-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(platform): add support for bitbucket fix #6 * docs(readme): update list of suppported platforms * fix(bitbucket): add username@ handling for remote urls * refactor: now all repos will have username@ trimmed by default
- Loading branch information
Showing
6 changed files
with
54 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use babel'; | ||
|
||
const bitbucket = ({ | ||
repo, | ||
}) => ({ | ||
hostsRepo: ({ host, response }) => { | ||
// If it's the known public domain (BitBucket.org) | ||
if (host.toLowerCase() === 'bitbucket.org') { | ||
return true | ||
} | ||
|
||
// If the header has the x-view-name | ||
if (response.headers['x-view-name'].indexOf('bitbucket') !== -1) { | ||
return true | ||
} | ||
|
||
// Otherwise.. | ||
return false | ||
}, | ||
getSelectionLink: ({ commitHash, relativePath, start, end }) => `${repo}/src/${commitHash}${relativePath}#lines-${start}:${end}`, | ||
getLineLink: ({ commitHash, relativePath, start }) => `${repo}/src/${commitHash}${relativePath}#lines-${start}`, | ||
getFileLink: ({ commitHash, relativePath }) => `${repo}/src/${commitHash}${relativePath}`, | ||
|
||
}) | ||
|
||
export default bitbucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters