Przeglądaj źródła

Merge pull request #91 from zricethezav/audit_branch

test branch opt, bump changelog
Zachary Rice 7 lat temu
rodzic
commit
8eb28cbb4c
3 zmienionych plików z 21 dodań i 1 usunięć
  1. 4 0
      CHANGELOG.md
  2. 16 0
      gitleaks_test.go
  3. 1 1
      main.go

+ 4 - 0
CHANGELOG.md

@@ -1,6 +1,10 @@
 CHANGELOG
 =========
 
+1.3.0
+-----
+- Target specific branch
+
 1.2.1
 -----
 - Check errors when generating commit patch

+ 16 - 0
gitleaks_test.go

@@ -339,6 +339,22 @@ func TestAuditRepo(t *testing.T) {
 				MaxGoRoutines: 2,
 			},
 		},
+		{
+			repo:        leaksRepo,
+			description: "audit specific bad branch",
+			numLeaks:    2,
+			testOpts: Options{
+				Branch: "master",
+			},
+		},
+		{
+			repo:        leaksRepo,
+			description: "audit specific good branch",
+			numLeaks:    0,
+			testOpts: Options{
+				Branch: "dev",
+			},
+		},
 		{
 			repo:        leaksRepo,
 			description: "audit all branch",

+ 1 - 1
main.go

@@ -115,7 +115,7 @@ type Config struct {
 }
 
 const defaultGithubURL = "https://api.github.com/"
-const version = "1.1.2"
+const version = "1.3.0"
 const defaultConfig = `
 title = "gitleaks config"
 # add regexes to the regex table