fix: Pass staged files to git secrets in hooks
Why:
Staged files were not passed to git secrets before, we want it to check
the staged files not our working tree.
@@ -100,7 +100,7 @@ def is_ignored_file_pattern(file_name):
def check_secrets(changed_files):
- if subprocess.call("git secrets --scan", shell=True):
+ if subprocess.call("git secrets --scan " + " ".join(changed_files), shell=True):
return ['git_secrets']
return []
