mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +01:00
Fix Github PR checks error
When a commit contained a file without patch information like an added empty file, there was a nil pointer dereference.
This commit is contained in:
1 parent
db08fc0564
commit
6e086c4297
2 files changed
+13
No files matched your search
@@ -311,6 +311,15 @@ func TestRun(t *testing.T) {
|
||||
regexp.MustCompile("main.go"),
|
||||
},
|
||||
},
|
||||
{
|
||||
testOpts: Options{
|
||||
GithubPR: "https://github.com/gitleakstest/gronit/pull/2",
|
||||
},
|
||||
description: "test github pr with commits without patch info",
|
||||
numLeaks: 0,
|
||||
expectedErrMsg: "",
|
||||
commitPerPage: 1,
|
||||
},
|
||||
}
|
||||
g := goblin.Goblin(t)
|
||||
for _, test := range tests {
|
||||
|
||||
Reference in new issue
Block a user