mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
Add Platform Bitbucket (#1886)
This commit is contained in:
1 parent
722ce8213a
commit
20f9a1d4eb
4 files changed
+45
No files matched your search
@@ -91,6 +91,18 @@ func createScmLink(remote *sources.RemoteInfo, finding report.Finding) string {
|
||||
link += fmt.Sprintf("-L%d", finding.EndLine)
|
||||
}
|
||||
return link
|
||||
case scm.BitbucketPlatform:
|
||||
link := fmt.Sprintf("%s/src/%s/%s", remote.Url, finding.Commit, filePath)
|
||||
if hasInnerPath {
|
||||
return link
|
||||
}
|
||||
if finding.StartLine != 0 {
|
||||
link += fmt.Sprintf("#lines-%d", finding.StartLine)
|
||||
}
|
||||
if finding.EndLine != finding.StartLine {
|
||||
link += fmt.Sprintf(":%d", finding.EndLine)
|
||||
}
|
||||
return link
|
||||
default:
|
||||
// This should never happen.
|
||||
return ""
|
||||
|
||||
Reference in new issue
Block a user