Skip to content

Commit ebeb5c2

Browse files
authored
Merge pull request #41 from NHSDigital/mm-odin-431-sonar-fixes
odin-431: sonar fix scripts and dependabot time
2 parents be6098e + e42d7e3 commit ebeb5c2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ updates:
1818
directory: "/" # Location of package manifests
1919
schedule:
2020
interval: "weekly"
21-
time: "08:00"
21+
time: "03:00"
2222

2323
groups:
2424
dev-dependencies:

scripts/check-secrets.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
scan_type=${1-pre-commit}
4+
scan_type="${1-pre-commit}"
55

66
if ! git secrets -- 1> /dev/null; then
77
echo "git secrets is not installed"
@@ -19,20 +19,20 @@ if [[ -e ./.gitdisallowed ]]; then
1919
git secrets --add --allowed '^\.gitdisallowed:[0-9]+:.*' || true
2020
fi
2121

22-
if { [ "${scan_type}" == "unstaged" ]; } ; then
22+
if { [[ "${scan_type}" == "unstaged" ]]; } ; then
2323
echo "scanning staged and unstaged files for secrets"
2424
git secrets --scan --recursive
2525
git secrets --scan --untracked
26-
elif { [ "${scan_type}" == "staged" ]; } ; then
26+
elif { [[ "${scan_type}" == "staged" ]]; } ; then
2727
echo "scanning staged files for secrets"
2828
git secrets --scan --recursive
29-
elif { [ "${scan_type}" == "commit-msg" ]; } ; then
29+
elif { [[ "${scan_type}" == "commit-msg" ]]; } ; then
3030
echo "checking commit msg for secrets"
3131
git secrets --commit_msg_hook -- "${2}"
32-
elif { [ "${scan_type}" == "prep-commit-msg" ]; } ; then
32+
elif { [[ "${scan_type}" == "prep-commit-msg" ]]; } ; then
3333
echo "checking commit msg for secrets"
3434
git secrets --prepare_commit_msg_hook -- "${2}"
35-
elif { [ "${scan_type}" == "history" ]; } ; then
35+
elif { [[ "${scan_type}" == "history" ]]; } ; then
3636
echo "checking commit history for secrets"
3737
git secrets --scan-history
3838
else

0 commit comments

Comments
 (0)