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
@@ -177,6 +177,33 @@ func Test_createScmLink(t *testing.T) {
|
||||
},
|
||||
want: "https://gitea.com/exampleorganisation/exampleproject/src/commit/20553ad96a4a080c94a54d677db97eed8ce2560d/Readme.md?display=source#L34",
|
||||
},
|
||||
// bitbucket
|
||||
"bitbucket - single line": {
|
||||
remote: &sources.RemoteInfo{
|
||||
Platform: scm.BitbucketPlatform,
|
||||
Url: "https://bitbucket.org/exampleorganisation/exampleproject",
|
||||
},
|
||||
finding: report.Finding{
|
||||
Commit: "20553ad96a4a080c94a54d677db97eed8ce2560d",
|
||||
File: "examplefile.json",
|
||||
StartLine: 25,
|
||||
EndLine: 25,
|
||||
},
|
||||
want: "https://bitbucket.org/exampleorganisation/exampleproject/src/20553ad96a4a080c94a54d677db97eed8ce2560d/examplefile.json#lines-25",
|
||||
},
|
||||
"bitbucket- multi line": {
|
||||
remote: &sources.RemoteInfo{
|
||||
Platform: scm.BitbucketPlatform,
|
||||
Url: "https://bitbucket.org/exampleorganisation/exampleproject",
|
||||
},
|
||||
finding: report.Finding{
|
||||
Commit: "20553ad96a4a080c94a54d677db97eed8ce2560d",
|
||||
File: "examplefile.json",
|
||||
StartLine: 25,
|
||||
EndLine: 30,
|
||||
},
|
||||
want: "https://bitbucket.org/exampleorganisation/exampleproject/src/20553ad96a4a080c94a54d677db97eed8ce2560d/examplefile.json#lines-25:30",
|
||||
},
|
||||
}
|
||||
for name, tt := range tests {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user